use _exit() instead of exit() in sighandlers
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
This commit is contained in:
parent
e98f4af950
commit
50644ff4de
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -604,7 +604,7 @@ needcol(int col) {
|
|||
|
||||
static void sig_handler(int signo)
|
||||
{
|
||||
exit(EXIT_SUCCESS);
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void exitbuf(void)
|
||||
|
|
Loading…
Reference in New Issue