A library for launching, maintaining, and terminating a family of long-lived python child processes on Windows and *nix.
Project description
processfamily
=============
A library for launching, maintaining, and terminating a family of long-lived python child processes on Windows and *nix.
The child processes can be launched from a console application or a Windows service / *nix daemon.
A simple line-oriented text-based control protocol is implemented over stdin / stdout that allows the child process to be cleanly shutdown.
For this reason, sys.stdin and sys.stdout are redirected to os.devnull in the child process.
By default, the output of the child process sys.stderr stream will be echoed on the parent sys.stderr stream.
In order to avoid orphaned processes, the child processes are created in a way that will ensure that they are killed if the parent dies.
On Windows this is implemented using a shared [Job Object](http://msdn.microsoft.com/en-us/library/ms684161(v=vs.85).aspx).
If the parent process is not already in a Job, it will create a Job Object, and add itself in to that job before any of the child processes are created.
For *nix this uses prctl PR_SET_PDEATHSIG setting.
=============
A library for launching, maintaining, and terminating a family of long-lived python child processes on Windows and *nix.
The child processes can be launched from a console application or a Windows service / *nix daemon.
A simple line-oriented text-based control protocol is implemented over stdin / stdout that allows the child process to be cleanly shutdown.
For this reason, sys.stdin and sys.stdout are redirected to os.devnull in the child process.
By default, the output of the child process sys.stderr stream will be echoed on the parent sys.stderr stream.
In order to avoid orphaned processes, the child processes are created in a way that will ensure that they are killed if the parent dies.
On Windows this is implemented using a shared [Job Object](http://msdn.microsoft.com/en-us/library/ms684161(v=vs.85).aspx).
If the parent process is not already in a Job, it will create a Job Object, and add itself in to that job before any of the child processes are created.
For *nix this uses prctl PR_SET_PDEATHSIG setting.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
processfamily-0.4.zip
(47.7 kB
view details)
File details
Details for the file processfamily-0.4.zip
.
File metadata
- Download URL: processfamily-0.4.zip
- Upload date:
- Size: 47.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b94cd18f89e3ca8cfc23c4dc6789840e46592de289bbcf97104891bca10abf3a |
|
MD5 | 4fa6af6b3b95133538f334e554f54f6a |
|
BLAKE2b-256 | fa66bb77a2eba7b2c4de5fe06950ec38c0d44f4bc1681ed705dee0757fb16ca8 |