diff options
author | turret <turret@duck.com> | 2024-01-14 21:14:09 -0600 |
---|---|---|
committer | turret <turret@duck.com> | 2024-01-14 21:14:09 -0600 |
commit | 4179b6eb0e4434dcac1f6bbf2e78709df964bf77 (patch) | |
tree | c2f91fbf94d11b1ac3049cc2f28507d4ed6bd5bd | |
parent | d4ba645474580e1da5a1297ceab40d5544bf53f0 (diff) | |
download | discord-bot-skeleton-4179b6eb0e4434dcac1f6bbf2e78709df964bf77.tar.gz discord-bot-skeleton-4179b6eb0e4434dcac1f6bbf2e78709df964bf77.tar.bz2 discord-bot-skeleton-4179b6eb0e4434dcac1f6bbf2e78709df964bf77.zip |
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
-rw-r--r-- | init/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |