kill: change null signal handling

This commit is contained in:
Matheus
2025-09-14 15:58:56 -03:00
parent 0933d49b8d
commit 74836fd60c
2 changed files with 5 additions and 4 deletions
+5
View File
@@ -278,6 +278,9 @@ int signal_wait(sigset_t *sigset, timespec_t *timeout, siginfo_t *siginfo, int *
}
void signal_signalthread(struct thread_t *thread, int signal, bool urgent) {
if (signal == 0)
return;
PROCESS_ENTER(thread->proc);
THREAD_ENTER(thread);
@@ -305,6 +308,8 @@ void signal_signalthread(struct thread_t *thread, int signal, bool urgent) {
}
void signal_signalproc(struct proc_t *proc, int signal) {
if (signal == 0)
return;
// first, check if any threads have the signal unmasked, and set as pending for the first one
PROCESS_ENTER(proc);
void *address = proc->signals.actions[signal].address;
-4
View File
@@ -26,10 +26,6 @@ syscallret_t syscall_kill(context_t *context, int pid, int signal) {
return ret;
}
// null signal is meant to find out about the existance of a process
if (signal == 0)
goto leave;
if (pid >= 1) {
if (signal != SIGCONT || jobctl_getpgid(target) != jobctl_getpgid(current_thread()->proc)) {
ret.errno = auth_process_check(&current_thread()->proc->cred, AUTH_ACTIONS_PROCESS_SIGNAL, target);