mirror of git://git.suckless.org/ubase
Fix segfault in killall5 without -o
Original patch by Platon Ryzhikov <ihummer63@yandex.ru>
This commit is contained in:
parent
2d58716c23
commit
11d2d1faaf
|
@ -73,11 +73,13 @@ main(int argc, char *argv[])
|
|||
|
||||
SLIST_INIT(&omitpid_head);
|
||||
|
||||
if (oflag) {
|
||||
for (p = strtok(arg, ","); p; p = strtok(NULL, ",")) {
|
||||
pe = emalloc(sizeof(*pe));
|
||||
pe->pid = estrtol(p, 10);
|
||||
SLIST_INSERT_HEAD(&omitpid_head, pe, entry);
|
||||
}
|
||||
}
|
||||
|
||||
if (sig != SIGSTOP && sig != SIGCONT)
|
||||
kill(-1, SIGSTOP);
|
||||
|
|
Loading…
Reference in New Issue