mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00: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.
|
// FIXME: Send to all processes.
|
||||||
ASSERT(pid != -1);
|
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;
|
Process* peer = nullptr;
|
||||||
{
|
{
|
||||||
InterruptDisabler disabler;
|
InterruptDisabler disabler;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue