aboutsummaryrefslogtreecommitdiffstats
path: root/init/log.c
diff options
context:
space:
mode:
authorturret <turret@duck.com>2024-01-11 17:36:37 -0600
committerturret <turret@duck.com>2024-01-11 17:36:37 -0600
commit3ed1e74e16da720dba46d117b12e21b9405ac569 (patch)
treeda91ba432d5a152765a13395a7c3cf1a7bc6a2e2 /init/log.c
parent1b61d9ddc1afdddd429e10eeda90a31ae7e69261 (diff)
downloaddiscord-bot-skeleton-3ed1e74e16da720dba46d117b12e21b9405ac569.tar.gz
discord-bot-skeleton-3ed1e74e16da720dba46d117b12e21b9405ac569.tar.bz2
discord-bot-skeleton-3ed1e74e16da720dba46d117b12e21b9405ac569.zip
init: panic on keyboard interrupt
also: change panic signal to be SIGKILL as sigint being caught would result in a loop
Diffstat (limited to 'init/log.c')
-rw-r--r--init/log.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/log.c b/init/log.c
index a3d0a7a..5c1b883 100644
--- a/init/log.c
+++ b/init/log.c
@@ -168,8 +168,9 @@ 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), SIGINT);
+ if(mode == PANICMODE_DIE) {
+ kill(-getpgid(pid), SIGKILL);
+ }
print(NOLOCK("5") "------------[ cut here ]------------");