XP is just a number | |
PerlMonks |
Re^4: TSHARK Child: Windows open2 non-blocking read, or redesign?by afoken (Chancellor) |
on Oct 13, 2010 at 08:59 UTC ( [id://865049]=note: print w/replies, xml ) | Need Help?? |
kill works for processes outside of Perl as well on Win32. ... for a very limited definition of "works". You can use kill to terminate other processes, but you can't send them signals, because Windows doesn't implement signals. Inside a perl.exe process that pseudo-fork()ed a child-pseudo-process, signals may work, but not outside that process. Simple example: killme.pl
killer.pl:
Open two terminals on a Linux system, start both scripts (killme.pl first), and you see this:
Open two command shells on Windows, start both scripts (again killme.pl first) and you see this:
Note that sending HUP terminated killme.pl, completely ignoring the fact that it has set up a HUP signal handler. One could argue that Windows has no HUP signal, so let's remove the relevant code parts and watch again:
Ooops, death by SIGTERM, again ignoring the signal handler inside killme.pl. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|