Kill all children processes when the parent dies
Project description
CaoE makes it easy to automatically kills all spawned children (and grandchildren) processes when the parent dies, even if killed by SIGKILL.
Usage
Simply call:
caoe.install()
at the beginning of your program.
How it works
When caoe.install() is called, it forks out a child process and a grandchild process. Both the parent and the child process will block, only the grandchild process will continue to run. The child process keeps checking the status of parent. If it found that the parent has died, it kills grandchild process (and grand-grandchild processes if there are any) and suicides.
Change Log
0.1.7
Fix a bug that child process will exit on any signal.
Drop support for python 2.6.
Use py.test and tox for test runner, drop dependency of nose.
Make tests more stable.
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
File details
Details for the file CaoE-0.1.7.tar.gz
.
File metadata
- Download URL: CaoE-0.1.7.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aff17421f13a55f295715096cb1a48f9dbb64ba7a44d022913339d6065f10a8e |
|
MD5 | 2ce2ca37fdc5d15505fe3d51b8056791 |
|
BLAKE2b-256 | 5482c7f39e38ea8c6b3a319c06b8c6d3778c3ffae74f17b156296b9825c4900d |