Update to PEP 3143 as sent in by the PEP author.

This commit is contained in:
Brett Cannon 2009-04-04 22:19:09 +00:00
parent 6b03fac7a3
commit eefd362257
1 changed files with 12 additions and 12 deletions

View File

@ -54,7 +54,7 @@ Simple example of direct `DaemonContext` usage::
from spam import do_main_program
with daemon.DaemonContext() as daemon_context:
with daemon.DaemonContext():
do_main_program()
More complex example usage::
@ -312,27 +312,27 @@ The following methods are defined.
* If the `pidfile` attribute is not ``None``, enter its context
manager.
* Register the `close` method to be called during Python's exit
processing.
When the function returns, the running program is a daemon
process.
`close()`
:Return: ``None``
Close the daemon context. This does nothing by default, but may be
overridden by a derived class.
Close the daemon context. This performs the following step:
* If the `pidfile` attribute is not ``None``, exit its context
manager.
`terminate(signal_number, stack_frame)`
:Return: ``None``
Signal handler for the ``signal.SIGTERM`` signal. Performs the
following steps:
following step:
* If the `pidfile` attribute is not ``None``, exit its context
manager.
* Call the `close()` method.
* Raise a ``SystemExit`` exception.
* Raise a ``SystemExit`` exception explaining the signal.
The class also implements the context manager protocol via
``__enter__`` and ``__exit__`` methods.
@ -577,8 +577,8 @@ rights and freedoms that would otherwise be restricted by copyright.
Local variables:
mode: rst
coding: utf-8
time-stamp-start: "^:Last-Modified:[ ]+"
time-stamp-end: "$"
time-stamp-start: "^Last-Modified:[ ]+\$Date: "
time-stamp-end: " \$$"
time-stamp-line-limit: 20
time-stamp-format: "%:y-%02m-%02d %02H:%02M"
End: