forked from enlightenment/efl
ALSO report children than exited due to signals... and why...
SVN revision: 7548
This commit is contained in:
parent
0969d64850
commit
a075b4b88c
|
@ -47,6 +47,9 @@ extern "C" {
|
|||
pid_t pid; /**< The process ID of the process that exited */
|
||||
int exit_code; /**< The exit code of the process */
|
||||
Ecore_Exe *exe; /**< The handle to the exited process, or NULL if not found */
|
||||
int exit_signal; /** < The signal that caused the process to exit */
|
||||
char exited : 1; /** < set to 1 if the process exited of its own accord */
|
||||
char signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
|
||||
void *ext_data; /**< Extension data - not used */
|
||||
};
|
||||
|
||||
|
|
|
@ -87,19 +87,25 @@ _ecore_signal_call(void)
|
|||
|
||||
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
|
||||
{
|
||||
if (WIFEXITED(status))
|
||||
Ecore_Event_Exe_Exit *e;
|
||||
|
||||
e = _ecore_event_exe_exit_new();
|
||||
if (e)
|
||||
{
|
||||
Ecore_Event_Exe_Exit *e;
|
||||
|
||||
e = _ecore_event_exe_exit_new();
|
||||
if (e)
|
||||
if (WIFEXITED(status))
|
||||
{
|
||||
e->exit_code = WEXITSTATUS(status);
|
||||
e->pid = pid;
|
||||
e->exe = _ecore_exe_find(pid);
|
||||
_ecore_event_add(ECORE_EVENT_EXE_EXIT, e,
|
||||
_ecore_event_exe_exit_free, NULL);
|
||||
e->exited = 1;
|
||||
}
|
||||
else if (WIFSIGNALED(status))
|
||||
{
|
||||
e->exit_signal = WTERMSIG(status);
|
||||
e->signalled = 1;
|
||||
}
|
||||
e->pid = pid;
|
||||
e->exe = _ecore_exe_find(pid);
|
||||
_ecore_event_add(ECORE_EVENT_EXE_EXIT, e,
|
||||
_ecore_event_exe_exit_free, NULL);
|
||||
}
|
||||
}
|
||||
sigchld_count--;
|
||||
|
|
Loading…
Reference in New Issue