summaryrefslogtreecommitdiff
path: root/examples/cgishell.cgi
diff options
context:
space:
mode:
authorRick Lin <rickhau@gmail.com>2014-11-21 09:29:41 +0800
committerRick Lin <rickhau@gmail.com>2014-11-21 09:29:41 +0800
commit671ebdb53db316829ef585519f1323cf43e3c125 (patch)
tree6cc04ce8c284a3c0a659698691b142d8cffad94a /examples/cgishell.cgi
parentf6cada92d67bd14f23532250ae55703980029e79 (diff)
downloadpexpect-git-671ebdb53db316829ef585519f1323cf43e3c125.tar.gz
Remove confusing comment in daemonize() of example/cgishell.cgi
Diffstat (limited to 'examples/cgishell.cgi')
-rwxr-xr-xexamples/cgishell.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/cgishell.cgi b/examples/cgishell.cgi
index b807a8b..23bef5f 100755
--- a/examples/cgishell.cgi
+++ b/examples/cgishell.cgi
@@ -176,11 +176,11 @@ def daemonize (stdin=None, stdout=None, stderr=None, daemon_pid_filename=None):
if stderr is None: stderr = DEVNULL
try:
- pid = os.fork()
+ pid = os.fork() # fork first child
except OSError as e:
raise Exception("%s [%d]" % (e.strerror, e.errno))
- if pid != 0: # The first child.
+ if pid != 0:
os.waitpid(pid,0)
if daemon_pid_filename is not None:
daemon_pid = int(file(daemon_pid_filename,'r').read())