From 307502d8b559516e01be154e1ce3f37df73bc965 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 2 Dec 2022 23:02:24 +0100 Subject: [PATCH] Assume SIGTSTP is defined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is required by POSIX.1-2001. Cc: Christian Göttsche Signed-off-by: Alejandro Colomar --- libmisc/loginprompt.c | 9 +-------- libmisc/pwd_init.c | 2 -- src/expiry.c | 2 -- src/gpasswd.c | 2 -- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/libmisc/loginprompt.c b/libmisc/loginprompt.c index 0a67f463..6ada2d05 100644 --- a/libmisc/loginprompt.c +++ b/libmisc/loginprompt.c @@ -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 } diff --git a/libmisc/pwd_init.c b/libmisc/pwd_init.c index 34940713..6452f029 100644 --- a/libmisc/pwd_init.c +++ b/libmisc/pwd_init.c @@ -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 diff --git a/src/expiry.c b/src/expiry.c index dc20b90e..70e6c20e 100644 --- a/src/expiry.c +++ b/src/expiry.c @@ -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 diff --git a/src/gpasswd.c b/src/gpasswd.c index b372de47..e8befac3 100644 --- a/src/gpasswd.c +++ b/src/gpasswd.c @@ -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