mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
Cleaned up code.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@480 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
2a1052bbce
commit
c2397475c5
24 changed files with 489 additions and 363 deletions
|
|
@ -48,11 +48,13 @@ static int child_check(void)
|
|||
|
||||
/* wait for each pid.. */
|
||||
for (tmp = pids; tmp != NULL; tmp = next) {
|
||||
next = tmp->next;
|
||||
if (waitpid(GPOINTER_TO_INT(tmp->data), &status, WNOHANG) > 0) {
|
||||
int pid = GPOINTER_TO_INT(tmp->data);
|
||||
|
||||
next = tmp->next;
|
||||
if (waitpid(pid, &status, WNOHANG) > 0) {
|
||||
/* process terminated, remove from list */
|
||||
pids = g_slist_remove(pids, tmp->data);
|
||||
signal_emit_id(signal_pidwait, 1, GPOINTER_TO_INT(tmp->data));
|
||||
signal_emit_id(signal_pidwait, 1, tmp->data);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue