mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
Kernel: Validate the sys$alarm signal send always succeeds
Previously we were ignoring this return code, instead use MUST(..) to make sure it always succeeds.
This commit is contained in:
parent
00936e151e
commit
09d5360be3
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ ErrorOr<FlatPtr> Process::sys$alarm(unsigned seconds)
|
|||
m_alarm_timer = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) Timer));
|
||||
}
|
||||
auto timer_was_added = TimerQueue::the().add_timer_without_id(*m_alarm_timer, CLOCK_REALTIME_COARSE, deadline, [this]() {
|
||||
[[maybe_unused]] auto rc = send_signal(SIGALRM, nullptr);
|
||||
MUST(send_signal(SIGALRM, nullptr));
|
||||
});
|
||||
if (!timer_was_added)
|
||||
return ENOMEM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue