]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
pg: calling exit on signal handler is not allowed
authorCristian Rodríguez <crrodriguez@opensuse.org>
Sun, 15 Jan 2023 01:33:14 +0000 (01:33 +0000)
committerCristian Rodríguez <crrodriguez@opensuse.org>
Sun, 15 Jan 2023 01:33:14 +0000 (01:33 +0000)
On the other hand, calling _exit is just fine.

text-utils/pg.c

index b309b4dcae4b05eb88f32458b3c50fbad7c5a334..adb3840be2acfb383f7ab1e4629d22351872f0f9 100644 (file)
@@ -219,7 +219,7 @@ static my_sighandler_t my_sigset(int sig, my_sighandler_t disp)
 /* Quit pg. */
 static void __attribute__((__noreturn__)) quit(int status)
 {
-       exit(status < 0100 ? status : 077);
+       _exit(status < 0100 ? status : 077);
 }
 
 /* Usage message and similar routines. */