From: Todd C. Miller Date: Mon, 7 Feb 2011 14:44:36 +0000 (-0500) Subject: Use RETSIGTYPE for signal handlers. X-Git-Tag: SUDO_1_7_5~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f3a534e6c244008dee7daf18082c118dca67244;p=sudo Use RETSIGTYPE for signal handlers. --HG-- branch : 1.7 --- diff --git a/exec.c b/exec.c index 91a4d1e90..bc2b865a0 100644 --- a/exec.c +++ b/exec.c @@ -586,7 +586,7 @@ schedule_signal(signo) * Generic handler for signals passed from parent -> child. * The other end of signal_pipe is checked in the main event loop. */ -void +RETSIGTYPE handler(s) int s; { diff --git a/exec_pty.c b/exec_pty.c index 405675943..7677e9236 100644 --- a/exec_pty.c +++ b/exec_pty.c @@ -102,7 +102,7 @@ static int exec_monitor __P((const char *path, char *argv[], char *envp[], int, int)); static void exec_pty __P((const char *path, char *argv[], char *envp[], int)); -static void sigwinch __P((int s)); +static RETSIGTYPE sigwinch __P((int s)); static void sync_ttysize __P((int src, int dst)); static void deliver_signal __P((pid_t pid, int signo)); static int safe_close __P((int fd)); diff --git a/mon_systrace.c b/mon_systrace.c index 198b34008..561055e5e 100644 --- a/mon_systrace.c +++ b/mon_systrace.c @@ -76,7 +76,7 @@ bad: return -1; } -static void +static RETSIGTYPE catchsig(signo) int signo; { diff --git a/sudo.h b/sudo.h index 98e3b3f16..a59677b3e 100644 --- a/sudo.h +++ b/sudo.h @@ -320,7 +320,7 @@ int set_perms __P((int)); /* sudo.c */ FILE *open_sudoers __P((const char *, int, int *)); int exec_setup __P((int, const char *, int)); -void cleanup __P((int)); +RETSIGTYPE cleanup __P((int)); void set_fqdn __P((void)); /* sudo_auth.c */ diff --git a/sudo_exec.h b/sudo_exec.h index eb0290bcb..ea43d55be 100644 --- a/sudo_exec.h +++ b/sudo_exec.h @@ -37,7 +37,7 @@ int fork_pty __P((const char *path, char *argv[], char *envp[], int sv[], int perform_io __P((fd_set *fdsr, fd_set *fdsw, struct command_status *cstat)); int suspend_parent __P((int signo)); void fd_set_iobs __P((fd_set *fdsr, fd_set *fdsw)); -void handler __P((int s)); +RETSIGTYPE handler __P((int s)); void pty_close __P((struct command_status *cstat)); void pty_setup __P((uid_t uid)); extern int signal_pipe[2]; diff --git a/sudoreplay.c b/sudoreplay.c index 968df800e..12fcd1209 100644 --- a/sudoreplay.c +++ b/sudoreplay.c @@ -190,7 +190,7 @@ extern char *get_timestr __P((time_t, int)); extern int term_raw __P((int, int)); extern int term_restore __P((int, int)); extern void zero_bytes __P((volatile void *, size_t)); -void cleanup __P((int)); +RETSIGTYPE cleanup __P((int)); static int list_sessions __P((int, char **, const char *, const char *, const char *)); static int parse_expr __P((struct search_node **, char **)); @@ -950,7 +950,7 @@ usage() /* * Cleanup hook for error()/errorx() */ -void +RETSIGTYPE cleanup(signo) int signo; { diff --git a/tgetpass.c b/tgetpass.c index 4fca589a3..b64bb8d3e 100644 --- a/tgetpass.c +++ b/tgetpass.c @@ -57,7 +57,7 @@ static volatile sig_atomic_t signo[NSIG]; -static void handler __P((int)); +static RETSIGTYPE handler __P((int)); static char *getln __P((int, char *, size_t, int)); static char *sudo_askpass __P((const char *)); @@ -290,7 +290,7 @@ getln(fd, buf, bufsiz, feedback) return nr == 1 ? buf : NULL; } -static void +static RETSIGTYPE handler(s) int s; {