Skip Menu |

This queue is for tickets about the Win32-Process CPAN distribution.

Report information
The Basics
Id: 46688
Status: open
Priority: 0/
Queue: Win32-Process

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.14
Fixed in: (no value)



[Emailed to JDB, 27/05/2009. I should have logged it in CPAN/RT instead, so here it is...] I've been rebuilding various things with VC9 lately, and came across a problem in the mod_perl test suite in which the httpd.exe wasn't getting killed after the tests had finished. It turns out to be a problem with Win32::Process::KillProcess(), which seems not to work any more in my VC9 build of perl. I can reproduce the problem with just this: use Win32::Process; my $obj; Win32::Process::Create( $obj, 'C:/Windows/Notepad.exe', 'Notepad', 0, NORMAL_PRIORITY_CLASS(), '.' ); sleep 2; my $pid = $obj->GetProcessID(); Win32::Process::KillProcess($pid, 0); If I change the last line to: $obj->Kill(0); then it works okay. The KillProcess() call works okay in a VC8 build of the same version of perl (5.10.0), with all the same build options, on the same machine, as the same user. I don't know what VC9 has done to break things, but if I change the OpenProcess() permissions used by KillProcess() to match those used by Open() then it works again with VC9. The attached patch does this. This might also resolve the following old CPAN ticket: http://rt.cpan.org/Public/Bug/Display.html?id=12672
Subject: killprocess.pat
Download killprocess.pat
application/octet-stream 674b

Message body not shown because it is not plain text.

I've created a pull request for this patch: https://github.com/jandubois/win32-process/pull/6 -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]