use forking instead of popen
refactor
close open file descriptors
add docstring
remove unused code
Revert "exit from watcher thread if shutdown is pending"

This reverts commit 59a14454ed759c3dd34832d2011c341ba6b0b2d5.
run worker in seperate process group
add test script for testing stuck processes
remove sigint condition from warm_shutdown