From 4179b6eb0e4434dcac1f6bbf2e78709df964bf77 Mon Sep 17 00:00:00 2001 From: turret Date: Sun, 14 Jan 2024 21:14:09 -0600 Subject: log: minor optimisations in panic, when killing process group, set pid to 0, where it gets our pgid for us, using kernel optimisations, saving a trip to kernel land to get the pgid ourselves --- init/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init/log.c') diff --git a/init/log.c b/init/log.c index 83702c6..84ab7a1 100644 --- a/init/log.c +++ b/init/log.c @@ -175,7 +175,7 @@ void _panic(const char *fileorigin, /* if we are going to die, we dont really need to clean up */ if(mode == PANICMODE_DIE) { - kill(-getpgid(pid), SIGTERM); + kill(0, SIGTERM); raise(SIGTERM); exit(0); } -- cgit v1.2.3