I\'m pretty sure one would do this using the os.plock(op) function, but I have no idea how. Also, if there\'s a better way, I\'d be grateful to find out. Code snippets are v
This is pretty much Python-independent! It's a classic example of Unix interprocess communication. One good option is to use popen()
to open a pipe between the parent and child processes, and pass data/messages back and forth along the pipe.
Take a look at the subprocess module, which can set up the necessary pipes automatically while spawning child processes.