[Python-checkins] r74866 - peps/trunk/pep-3143.txt
georg.brandl
python-checkins at python.org
Thu Sep 17 11:37:29 CEST 2009
Author: georg.brandl
Date: Thu Sep 17 11:37:29 2009
New Revision: 74866
Log:
Update to PEP 3143 from Ben.
Modified:
peps/trunk/pep-3143.txt
Modified: peps/trunk/pep-3143.txt
==============================================================================
--- peps/trunk/pep-3143.txt (original)
+++ peps/trunk/pep-3143.txt Thu Sep 17 11:37:29 2009
@@ -210,8 +210,6 @@
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 @@
* ``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 @@
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 @@
* 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 @@
`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 @@
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 :
More information about the Python-checkins
mailing list