Tue Apr 26 16:29:50 2011: Request 67774 was acted upon. Transaction: Correspondence added by j...@activestate.com Queue: Win32-Process Subject: RE: [rt.cpan.org #67774] A safer alternative to TerminateProcess() ? Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: apo...@cpan.org Status: open Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=67774 >
On Tue, 26 Apr 2011, Apocalypse via RT wrote: > I was browsing the interwebs and found this page. > > http://drdobbs.com/windows/184416547?pgno=1 > > I noticed that various CPAN smokers sometimes gets "wedged" on win32 > because they attempt to kill the smoking process and in turn, it wedges > the Perl DLL. While I have encountered this a few times, others have > said it happens with regularity. What does "wedged" mean here? I assume it means that the process somehow got stuck and couldn't actually get killed? In that case I don't think using SafeKillProcess() will help at all, as it makes it *less* likely that the killing will actually succeed. As MSDN says (under the ExitProcess documentation): | Therefore, if you do not know the state of all threads in your | process, it is better to call TerminateProcess than ExitProcess." So I would really like to see an actual example where SafeKillProcess() solves a problem before adding a (potentially useless) API to it. BTW, I'm especially interested in what "in turn, it wedges the Perl DLL" means. How do you detect this wedging, and what are the negative side effects of it? Cheers, -Jan