|Keep It Simple, Stupid|
Re^6: SOLUTION: Read STDOUT from child process and kill process treeby Dirk80 (Pilgrim)
|on Mar 12, 2012 at 16:40 UTC ( #959141=note: print w/replies, xml )||Need Help??|
Thanks again to all of you helping me so much.
Here I want to post the solution of my original problem.
This code solves my two problems. Being able to read from a child process, but also being able to kill the whole process tree instead of only killing the child process and to have zombie processes.
If you press the "Cancel" Button then the calculator and the child process which counts from 1 to 1000 are killed. Even if you quit the gui with the cross in the right upper corner the grandchild process "calculator" is killed.
Without a job environment in a Win32 environment the grandchild calculator would stay as a zombie process.
Feedback to this code is welcome.
In Section Seekers of Perl Wisdom