weston: don't hang in wait()
Pausing weston (with ^Z in the shell) and putting it in the background made it hang.
This commit is contained in:
committed by
Kristian Høgsberg
parent
d273e28567
commit
027b962d8c
+4
-1
@@ -59,7 +59,10 @@ sigchld_handler(int signal_number, void *data)
|
|||||||
int status;
|
int status;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
pid = wait(&status);
|
pid = waitpid(-1, &status, WNOHANG);
|
||||||
|
if (!pid)
|
||||||
|
return 1;
|
||||||
|
|
||||||
wl_list_for_each(p, &child_process_list, link) {
|
wl_list_for_each(p, &child_process_list, link) {
|
||||||
if (p->pid == pid)
|
if (p->pid == pid)
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user