Browse Source

kernel: kill(0) sends to process group

K. Lange 2 years ago
parent
commit
50f5ebaeca
1 changed files with 2 additions and 0 deletions
  1. 2 0
      kernel/sys/syscall.c

+ 2 - 0
kernel/sys/syscall.c

@@ -847,6 +847,8 @@ static int sys_shm_release(char * path) {
 static int sys_kill(pid_t process, uint32_t signal) {
 	if (process < -1) {
 		return group_send_signal(-process, signal, 0);
+	} else if (process == 0) {
+		return group_send_signal(current_process->job, signal, 0);
 	} else {
 		return send_signal(process, signal, 0);
 	}