kill -9 message
This commit is contained in:
parent
83bde42e02
commit
0b3b3e2810
1 changed files with 5 additions and 6 deletions
|
|
@ -25,18 +25,17 @@ void sigchld_handler(int signo)
|
||||||
start = data_singleton()->jobc.list;
|
start = data_singleton()->jobc.list;
|
||||||
pid = waitpid(-1, &status, WNOHANG);
|
pid = waitpid(-1, &status, WNOHANG);
|
||||||
DG("SIGCHLD pid=%i", pid);
|
DG("SIGCHLD pid=%i", pid);
|
||||||
/* start = NULL; */
|
|
||||||
list = start ? ft_lst_find(start, &pid, ft_cmppid) : NULL;
|
list = start ? ft_lst_find(start, &pid, ft_cmppid) : NULL;
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
job = list->content;
|
job = list->content;
|
||||||
if (status == 0)
|
if (status == 0)
|
||||||
ft_printf("[%i] + done\t%s\n", job->id, job->command);
|
ft_printf("[%i] + %i done\t%s\n", job->id, pid, job->command);
|
||||||
|
else if (status == 9)
|
||||||
|
ft_printf("[%i] + %i killed\t%s\n", job->id, pid, job->command);
|
||||||
else
|
else
|
||||||
ft_printf("[%i] + exit %i\t%s\n", job->id, status, job->command);
|
ft_printf("[%i] + %i exit %i\t%s\n",
|
||||||
|
job->id, pid, status, job->command);
|
||||||
ft_prompt();
|
ft_prompt();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
DG("SIGCHLD but no find");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue