mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Kernel: kill() syscall should support sending a signal to yourself.
This commit is contained in:
parent
166aadc4e1
commit
258f4671ea
1 changed files with 5 additions and 1 deletions
|
@ -1419,7 +1419,11 @@ int Process::sys$kill(pid_t pid, int signal)
|
|||
// FIXME: Send to all processes.
|
||||
ASSERT(pid != -1);
|
||||
}
|
||||
ASSERT(pid != current->pid()); // FIXME: Support this scenario.
|
||||
if (pid == m_pid) {
|
||||
send_signal(signal, this);
|
||||
Scheduler::yield();
|
||||
return 0;
|
||||
}
|
||||
Process* peer = nullptr;
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
|
|
Loading…
Add table
Reference in a new issue