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