This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
@author Sunil Mallya | |
Sample code to show a parent - child like process communication model where parent listens on a port and passes the pickled file descriptor | |
to the child process to read the bytes off the socket. The communication in this snippet is via a Queue which is thread/process safe | |
Just to be clear, the parent process is still accepting the connection and we are sending a live fd to the child | |
""" | |
import os | |
import sys |