mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
kill: change null signal handling
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(¤t_thread()->proc->cred, AUTH_ACTIONS_PROCESS_SIGNAL, target);
|
||||
|
||||
Reference in New Issue
Block a user