server connected by ( ' at sun apr : : server connected by ( ' at sun apr : : server connected by ( ' at sun apr : : ]ps - uid pid ppid stime tty : pts/ : pts/ : pts/ : pts/ : pts/ : pts/ : pts/ : pts/ : pts/ : pts/ : pts/ time cmd : : python fork-server-signal py : : python fork-server-signal py : : python fork-server-signal py : : python fork-server-signal py : : python fork-server-signal py : : python fork-server-signal py : : python fork-server-signal py : : python fork-server-signal py : : python fork-server-signal py : : ps - : : -bash ]ps - uid pid ppid stime tty : pts/ : pts/ : pts/ time cmd : : python fork-server-signal py : : ps - : : -bash and now that 've shown you how to use signal handling to reap children automatically on linuxi should underscore that this technique is not universally supported across all flavors of unix if you care about portabilitymanually reaping children as we did in example - may still be desirable why multiprocessing doesn' help with socket server portability in we learned about python' new multiprocessing module as we sawit provides way to start function calls in new processes that is more portable than the os fork call used in this section' server codeand it runs processes instead of threads to work around the thread gil in some scenarios in particularmultiprocessing works on standard windows python toounlike direct os fork calls experimented with server variant based upon this module to see if its portability might help for socket servers its full source code is in the examples package in file multi-server pybut here are its important bits that differrest unchanged from fork-server py from multiprocessing import process def handleclient(connection)print('child:'os getpid()time sleep( while truedata connection recv( rest unchanged child processreplyexit simulate blocking activity readwrite client socket till eof when socket closed def dispatcher()listen until process killed handling multiple clients