From 01503a37c9ae3bc608e7ba9fb476ab7aca3fdd46 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 20 Feb 2019 07:58:41 -0600 Subject: Exit code should indicate _which_ signal oneit's exiting due to. --- toys/other/oneit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other') diff --git a/toys/other/oneit.c b/toys/other/oneit.c index 2ee21768..c400f6d6 100644 --- a/toys/other/oneit.c +++ b/toys/other/oneit.c @@ -57,7 +57,7 @@ static void oneit_signaled(int signal) // PID 1 can't call reboot() because it kills the task that calls it, // which causes the kernel to panic before the actual reboot happens. sync(); - if (getpid()!=1) _exit(0); + if (getpid()!=1) _exit(127+signal); if (!vfork()) reboot(action); } -- cgit v1.2.3