do while(wait3) for sighandler
git-svn-id: https://svn.musicpd.org/mpd/trunk@680 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
7091235a68
commit
823a7900bd
|
@ -47,8 +47,8 @@ void hupSigHandler(int signal) {
|
||||||
|
|
||||||
void chldSigHandler(int signal) {
|
void chldSigHandler(int signal) {
|
||||||
int status;
|
int status;
|
||||||
int pid = wait3(&status,WNOHANG,NULL);
|
int pid;
|
||||||
if(pid>0) {
|
while((pid = wait3(&status,WNOHANG,NULL)) > 0) {
|
||||||
player_sigChldHandler(pid,status);
|
player_sigChldHandler(pid,status);
|
||||||
directory_sigChldHandler(pid,status);
|
directory_sigChldHandler(pid,status);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue