Skip to content
Browse files

Print child PID on startup

  • Loading branch information...
1 parent 0265f30 commit af4cb62b72bee8a1e11b508f801031001d1da997 @rspivak committed
Showing with 2 additions and 0 deletions.
  1. +1 −0 server03.py
  2. +1 −0 server03a.py
View
1 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)
View
1 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)

0 comments on commit af4cb62

Please sign in to comment.
Something went wrong with that request. Please try again.