The ProcessTreeKiller doesn't work for cygwin processes launched from a cygwin process.
- Launch a CMD in a terminal.
- set AAA=123
- sleep 10000
- Look sleep up in Process Explorer and notice that it has only 4 environment variables, none of which is AAA.
This is because cygwin maintains the environment variables in the shared memory space for cygwin.dll: See the bottom of http://cygwin.com/cygwin-ug-net/setup-env.html
One possible solution might be to have a checkbox that enables a cygwin hack that fires up bash.exe and scans /proc//cwd looking for processes that are in the workspace. Then grabs the /proc//winpid and kills them.
The downside is this may kill too much (a random user cd'd into the workspace, unlikely a problem since it'll prevent directory deletion anyway) and may miss any processes that cd outside the workspace. But better than nothing.