mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 16:05:07 +00:00
Kernel: Implement kill(0, signal)
This sends the signal to everyone in the same process group as the calling process.
This commit is contained in:
parent
06de0e670c
commit
32810a920f
1 changed files with 5 additions and 2 deletions
|
@ -1298,8 +1298,11 @@ int Process::sys$kill(pid_t pid, int signal)
|
|||
if (signal < 0 || signal >= 32)
|
||||
return -EINVAL;
|
||||
if (pid == 0) {
|
||||
// FIXME: Send to same-group processes.
|
||||
ASSERT(pid != 0);
|
||||
Process::for_each_in_pgrp(pgid(), [&](auto& process) {
|
||||
process.send_signal(signal, this);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
if (pid == -1) {
|
||||
// FIXME: Send to all processes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue