From af4cb62b72bee8a1e11b508f801031001d1da997 Mon Sep 17 00:00:00 2001 From: Ruslan Spivak Date: Tue, 12 Jun 2012 20:45:09 -0400 Subject: [PATCH] Print child PID on startup --- server03.py | 1 + server03a.py | 1 + 2 files changed, 2 insertions(+) diff --git a/server03.py b/server03.py index 8ec7d58..02284e4 100644 --- a/server03.py +++ b/server03.py @@ -78,6 +78,7 @@ def create_child(index, listen_sock): if pid > 0: # parent return pid + print 'Child started with PID: %s' % os.getpid() # child never returns child_loop(index, listen_sock) diff --git a/server03a.py b/server03a.py index 0d098ac..6443e9e 100644 --- a/server03a.py +++ b/server03a.py @@ -81,6 +81,7 @@ def create_child(index, listen_sock): if pid > 0: # parent return pid + print 'Child started with PID: %s' % os.getpid() # child never returns try: child_loop(index, listen_sock)