
scheidell at secnap
Jan 7, 2002, 5:42 AM
Post #1 of 1
(130 views)
Permalink
|
|
RE: fix for CVS 1.1x, Was Scans Stop
|
|
> the machine. > > I installed the latest Development version from CVS. Compiling went ok and > a quick test seemed to do just fine.. Give this a shot: fixed similar problem on SMB SID stops. changes behaviour of alive() functions. this function was fixed to keep FREEBSD from panic/reboot, but seems to have some bad side effects (note, this also works for FBSD as well, so don't worry, FBSD users) > All email send to me is bound to the rules described on my homepage. > hvdkooij [at] vanderkooij http://hvdkooij.xs4all.nl/ > Don't meddle in the affairs of sysadmins, > for they are subtle and quick to anger. > --- utils.c.CVS Thu Jan 3 11:33:17 2002 +++ utils.c Sat Jan 5 08:25:49 2002 @@ -887,8 +887,21 @@ process_alive(pid) pid_t pid; { - while(waitpid(pid, NULL, WNOHANG) == EINTR); - /* do nothing */ + int ret; + int i; + + /* + * Invalid argument + */ + if(!pid) + return 0; + + /* + * Second method, we attempt to use kill. But first, we + * wait() for the process, just in case it's a zombie. + */ + for(i=0,ret=1;(i<100) && (ret > 0);i++) + ret = waitpid(pid, NULL, WNOHANG); return kill(pid, 0) == 0; } -- Michael Scheidell Secnap Network Security, LLC scheidell [at] secnap 1+(561) 368-9561 See updated IT Security News at http://www.fdma.com/
|