#2415 enhancement new
update/replace spawnProcess and ProcessProtocol
|Reported by:||bigdog||Owned by:|
|Cc:||spiv, jknight, teratorn, oubiwann, exarkun||Branch:|
spawnProcess and Process Protocol has provided many years of service, but it is time to look at twisted mechanism to launch and manage child process execution.
Potential Approach 1) gather requirements (purpose of this ticket) 2) define new API that supports requirements 3) deprecate old spawnProcess and proxcess API
1) add the ability to spawn a process on the behalf a specific user.
sample use case: A twisted process is acting as a grid compute node. A user schedules processes to execute on multiple machines. The process mus run as the user requesting the task, not the owner of the twisted grid node process.
Often programs are licensed to specific users
2) ability to add kill timeout to new process .
sample use case: A twisted process is used to validate a product. This validation requires to twisted to spawn a process to run the product being verified. Sometimes the child process "gets lost", and does not terminate. A kill timeout would :
- spawnProcess, register watchdog kill task.
- if the watchdog kill fires before the child process exits, the child process is killed
- the watchdog kill process is disabled when the child process complets