On Thu, 3 Feb 2011, Craig A. Berry wrote: > On Thu, Feb 3, 2011 at 7:19 AM, Nicholas Clark <nick@ccl4.org> wrote: > >>> As I think Jesse said on IRC, I also feel that the code from which_perl() >>> should have copyright attribution. git blame log says that it's >>> Schwern, Jarkko, Craig Berry, Paul Green, and me. > > Jerry Hedden wrote the watchdog code and I think George Greer made > some important improvements to it. On Win32 there was a case in openpid.t where the call chain was: 1. perl 2. \- cmd /c 3. \- perl And the watchdog in #3 would try to kill its parent (#2) but if that process had already terminated before the timeout and PIDs recycled fast enough (which seems easy in Windows 2000) then it will kill an unrelated, innocent process. I was trying to reproduce the intermittant openpid.t failure at the time so I had a script essentially doing: @echo off :loop .\perl -I lib t\io\openpid.t if errorlevel 1 goto failed goto loop :failed Watching Process Explorer (or Task Manager) showed perl processes #3 hanging around until the full time expired then trying to kill a process that already terminated and the smoke tests running in the same VM had tests randomly terminated if they happened to have reused the same PID at the time. So the extra argument let it choose an alarm strategy to avoid that. I also made it more lenient to valgrind runs because valgrind is sloooow but that's not really complex. -- George GreerThread Previous | Thread Next