Assume SIGTSTP is defined
It is required by POSIX.1-2001. Cc: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
74c8015730
commit
307502d8b5
@ -42,21 +42,16 @@ void login_prompt (const char *prompt, char *name, int namesize)
|
||||
FILE *fp;
|
||||
|
||||
sighandler_t sigquit;
|
||||
#ifdef SIGTSTP
|
||||
sighandler_t sigtstp;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* There is a small chance that a QUIT character will be part of
|
||||
* some random noise during a prompt. Deal with this by exiting
|
||||
* instead of core dumping. If SIGTSTP is defined, do the same
|
||||
* thing for that signal.
|
||||
* instead of core dumping. Do the same thing for SIGTSTP.
|
||||
*/
|
||||
|
||||
sigquit = signal (SIGQUIT, login_exit);
|
||||
#ifdef SIGTSTP
|
||||
sigtstp = signal (SIGTSTP, login_exit);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* See if the user has configured the issue file to
|
||||
@ -148,8 +143,6 @@ void login_prompt (const char *prompt, char *name, int namesize)
|
||||
*/
|
||||
|
||||
(void) signal (SIGQUIT, sigquit);
|
||||
#ifdef SIGTSTP
|
||||
(void) signal (SIGTSTP, sigtstp);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -49,9 +49,7 @@ void pwd_init (void)
|
||||
signal (SIGPIPE, SIG_IGN);
|
||||
signal (SIGQUIT, SIG_IGN);
|
||||
signal (SIGTERM, SIG_IGN);
|
||||
#ifdef SIGTSTP
|
||||
signal (SIGTSTP, SIG_IGN);
|
||||
#endif
|
||||
#ifdef SIGTTOU
|
||||
signal (SIGTTOU, SIG_IGN);
|
||||
#endif
|
||||
|
@ -133,9 +133,7 @@ int main (int argc, char **argv)
|
||||
(void) signal (SIGHUP, catch_signals);
|
||||
(void) signal (SIGINT, catch_signals);
|
||||
(void) signal (SIGQUIT, catch_signals);
|
||||
#ifdef SIGTSTP
|
||||
(void) signal (SIGTSTP, catch_signals);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* expiry takes one of two arguments. The default action is to give
|
||||
|
@ -1145,9 +1145,7 @@ int main (int argc, char **argv)
|
||||
(void) signal (SIGINT, catch_signals);
|
||||
(void) signal (SIGQUIT, catch_signals);
|
||||
(void) signal (SIGTERM, catch_signals);
|
||||
#ifdef SIGTSTP
|
||||
(void) signal (SIGTSTP, catch_signals);
|
||||
#endif
|
||||
|
||||
/* Prompt for the new password */
|
||||
#ifdef SHADOWGRP
|
||||
|
Loading…
Reference in New Issue
Block a user