Update to PEP 3143 from Ben.

This commit is contained in:
Georg Brandl 2009-09-17 09:37:29 +00:00
parent cddfac92a6
commit 195b458786
1 changed files with 30 additions and 7 deletions

View File

@ -210,8 +210,6 @@ The following options are defined.
actually defined in the ``signal`` module will appear in the
default map:
* ``signal.SIGCLD``: ``None``
* ``signal.SIGTTIN``: ``None``
* ``signal.SIGTTOU``: ``None``
@ -220,6 +218,13 @@ The following options are defined.
* ``signal.SIGTERM``: ``'terminate'``
Depending on how the program will interact with its child
processes, it may need to specify a signal map that includes the
``signal.SIGCHLD`` signal (received when a child process exits).
See the specific operating system's documentation for more detail
on how to determine what circumstances dictate the need for signal
handlers.
`uid`
:Default: ``os.getuid()``
@ -271,6 +276,10 @@ The following methods are defined.
Open the daemon context, turning the current program into a daemon
process. This performs the following steps:
* If this instance's `is_open` property is true, return
immediately. This makes it safe to call `open` multiple times on
an instance.
* If the `prevent_core` attribute is true, set the resource limits
for the process to prevent any core dump from the process.
@ -312,6 +321,9 @@ The following methods are defined.
* If the `pidfile` attribute is not ``None``, enter its context
manager.
* Mark this instance as open (for the purpose of future `open` and
`close` calls).
* Register the `close` method to be called during Python's exit
processing.
@ -321,11 +333,26 @@ The following methods are defined.
`close()`
:Return: ``None``
Close the daemon context. This performs the following step:
Close the daemon context. This performs the following steps:
* If this instance's `is_open` property is false, return
immediately. This makes it safe to call `close` multiple times
on an instance.
* If the `pidfile` attribute is not ``None``, exit its context
manager.
* Mark this instance as closed (for the purpose of future `open`
and `close` calls).
`is_open`
:Return: ``True`` if the instance is open, ``False`` otherwise.
This property exposes the state indicating whether the instance is
currently open. It is ``True`` if the instance's `open` method has
been called and the `close` method has not subsequently been
called.
`terminate(signal_number, stack_frame)`
:Return: ``None``
@ -577,9 +604,5 @@ rights and freedoms that would otherwise be restricted by copyright.
Local variables:
mode: rst
coding: utf-8
time-stamp-start: "^Last-Modified:[ ]+\$Date: "
time-stamp-end: " \$$"
time-stamp-line-limit: 20
time-stamp-format: "%:y-%02m-%02d %02H:%02M"
End:
vim: filetype=rst fileencoding=utf-8 :