develooper Front page | perl.perl5.porters | Postings from April 2007

[PATCH] Fix kill(0, $pid) on Windows

Thread Next
From:
Jan Dubois
Date:
April 16, 2007 17:36
Subject:
[PATCH] Fix kill(0, $pid) on Windows
Message ID:
01df01c78088$59718d30$0c54a790$@com
I broke the kill(0, $pid) behavior on Windows with change 29605
(the one implementing killpg()):

    http://public.activestate.com/cgi-bin/perlbrowse/p/29605

The problem is that OpenProcess() returns a HANDLE, but on error it
returns NULL and not the usual INVALID_HANDLE_VALUE. I assume the reason
for this is that at the kernel level, the INVALID_HANDLE_VALUE bit
pattern is the same as the pseudo handle for the current process.

The attached patch restores kill(0, $pid) behavior.

Cheers,
-Jan


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About