[PATCH] start-stop-daemon fails to stop processes and sometimes fails to start them.

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Thu Apr 17 22:24:32 UTC 2008


> -----Original Message-----
> From: busybox-bounces at busybox.net [mailto:busybox-bounces at busybox.net] On Behalf Of Joakim Tjernlund
> Sent: den 17 april 2008 19:03
> To: busybox at busybox.net
> Subject: [PATCH] start-stop-daemon fails to stop processes and sometimes fails to start them.
> 
> pid_is_cmd() would call "die" if it got a stale file.
> readdir() will fail if a file becomes stale, detect this and
> move on.
> 
> This patch is aginst bb 1.8.2 gentoo version so it might not apply
> cleanly. I hope that wont be a problem.
> 
>  Jocke

[SNIP]

>  		foundany++;
> +		if (pid == UINT_MAX) /* NaN */

That should probably be "if (errno)" instead, not tested though.

> +			continue;
>  		check(pid);
>  	}
>  	closedir(procdir);





More information about the busybox mailing list