char *buf;
unsigned long buflen;
int fd;
+ pid_t pid;
} Timed_Menu_Data;
TIMED_MENU_DATA(m)->fd = -1;
}
- /* child is reaped by glib ? */
+ if (TIMED_MENU_DATA(m)->pid != -1) {
+ waitpid(TIMED_MENU_DATA(m)->pid, NULL, 0);
+ TIMED_MENU_DATA(m)->pid = -1;
+ }
}
void timed_menu_read_pipe(int fd, Menu *menu)
NULL,
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
NULL,
- NULL,
+ &TIMED_MENU_DATA(data)->pid,
NULL,
NULL,
&child_stdout,
d->buf = NULL;
d->buflen = 0;
d->fd = -1;
+ d->pid = -1;
m->plugin_data = (void *)d;