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

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

Thread Previous | Thread Next
From:
Steve Hay
Date:
April 17, 2007 04:20
Subject:
Re: [PATCH] Fix kill(0, $pid) on Windows
Message ID:
4624AD68.4020906@uk.radan.com
Jan Dubois wrote:
> 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.

Good catch! I guess there really ought to be a test for this behaviour. 
I'll have a look later if nobody else beats me to it.

Anyway, applied as #30970. Thanks.

-- 

Thread Previous | 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