]> granicus.if.org Git - sudo/commitdiff
Use RETSIGTYPE for signal handlers.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Feb 2011 14:44:36 +0000 (09:44 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Feb 2011 14:44:36 +0000 (09:44 -0500)
--HG--
branch : 1.7

exec.c
exec_pty.c
mon_systrace.c
sudo.h
sudo_exec.h
sudoreplay.c
tgetpass.c

diff --git a/exec.c b/exec.c
index 91a4d1e90498d3033ffeaeb0d711793f2f3eed24..bc2b865a0aef35b297bb51d43b44b6748b889ed8 100644 (file)
--- 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;
 {
index 405675943aaa5e8d8748427a840addc512898592..7677e9236a089967693706444ebbc230a530faae 100644 (file)
@@ -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));
index 198b34008fe2ffed1ce6ad5b60dc6eb9a16f465c..561055e5e139faf7155dc23673e3894e567598de 100644 (file)
@@ -76,7 +76,7 @@ bad:
     return -1;
 }
 
-static void
+static RETSIGTYPE
 catchsig(signo)
     int signo;
 {
diff --git a/sudo.h b/sudo.h
index 98e3b3f16c05f8b22a1eb6d76e172f975b46c30e..a59677b3edb30737861d3e261da4da6172222041 100644 (file)
--- 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 */
index eb0290bcb1ce1dbfbe9299226dc471e3db39bda4..ea43d55beace8aff26bcfcd3fc606c706ab6ee48 100644 (file)
@@ -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];
index 968df800e5ae66504452af424a7a15faff52e4ff..12fcd12091564a796d824a3010593e90daed1ed8 100644 (file)
@@ -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;
 {
index 4fca589a30ea6affbebb8c99cf0d11ddd8144f8d..b64bb8d3e51e5ca3c8379f4ecbba7f68aac00b37 100644 (file)
@@ -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;
 {