X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b56c88e2847c582f9b18ae5bbda44f033cd49c42..ec173fd2c:/sbr/signals.c?ds=sidebyside diff --git a/sbr/signals.c b/sbr/signals.c index 7645c1cc..36ba9d02 100644 --- a/sbr/signals.c +++ b/sbr/signals.c @@ -1,17 +1,13 @@ - -/* - * signals.c -- general signals interface for nmh +/* signals.c -- general signals interface for nmh * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ -#include -#include - -/* sbr/m_mktemp.c */ -extern void remove_registered_files(int); +#include "h/mh.h" +#include "h/signals.h" +#include "m_mktemp.h" /* @@ -43,8 +39,8 @@ SIGNAL (int sig, SIGNAL_HANDLER func) # endif } if (sigaction(sig, &act, &oact) < 0) - return (SIG_ERR); - return (oact.sa_handler); + return SIG_ERR; + return oact.sa_handler; } @@ -60,7 +56,7 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func) struct sigaction act, oact; if (sigaction(sig, NULL, &oact) < 0) - return (SIG_ERR); + return SIG_ERR; if (oact.sa_handler != SIG_IGN) { act.sa_handler = func; sigemptyset(&act.sa_mask); @@ -76,9 +72,9 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func) # endif } if (sigaction(sig, &act, &oact) < 0) - return (SIG_ERR); + return SIG_ERR; } - return (oact.sa_handler); + return oact.sa_handler; } @@ -86,7 +82,8 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func) * For use by nmh_init(). */ int -setup_signal_handlers() { +setup_signal_handlers(void) +{ /* * Catch HUP, INT, QUIT, and TERM so that we can clean up tmp * files when the user terminates the process early. And also a