Use _exit() instead of exit() in sighandlers. Signed-off-by: Marek Polacek <mmpolacek@xxxxxxxxx> --- login-utils/last.c | 2 +- login-utils/shutdown.c | 2 +- misc-utils/write.c | 2 +- text-utils/rev.c | 2 +- text-utils/ul.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/login-utils/last.c b/login-utils/last.c index 0c4c0a1..564e05c 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -473,6 +473,6 @@ onintr(int signo) { ct = utmp_ctime(&utmpbuf); printf(_("\ninterrupted %10.10s %5.5s \n"), ct, ct + 11); if (signo == SIGINT) - exit(1); + _exit(1); (void)fflush(stdout); /* fix required for rsh */ } diff --git a/login-utils/shutdown.c b/login-utils/shutdown.c index f7bc000..0078df2 100644 --- a/login-utils/shutdown.c +++ b/login-utils/shutdown.c @@ -132,7 +132,7 @@ int_handler(int sig) unlink(_PATH_NOLOGIN); signal(SIGINT, SIG_DFL); my_puts(_("Shutdown process aborted")); - exit(1); + _exit(1); } static int diff --git a/misc-utils/write.c b/misc-utils/write.c index 8ed7763..c4f4ecc 100644 --- a/misc-utils/write.c +++ b/misc-utils/write.c @@ -331,7 +331,7 @@ void do_write(char *tty, char *mytty, uid_t myuid) { static void done(int dummy) { (void)printf("EOF\r\n"); - exit(0); + _exit(0); } /* diff --git a/text-utils/rev.c b/text-utils/rev.c index 907b032..7a42d7e 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -66,7 +66,7 @@ wchar_t *buf; static void sig_handler(int signo) { free(buf); - exit(EXIT_SUCCESS); + _exit(EXIT_SUCCESS); } static void __attribute__((__noreturn__)) usage(FILE *out) diff --git a/text-utils/ul.c b/text-utils/ul.c index 4601e3c..dbcc321 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -604,7 +604,7 @@ needcol(int col) { static void sig_handler(int signo) { - exit(EXIT_SUCCESS); + _exit(EXIT_SUCCESS); } static void exitbuf(void) -- 1.7.3.2 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html