summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2001-11-28 17:29:04 +0000
committerarr <arr@FreeBSD.org>2001-11-28 17:29:04 +0000
commit1ec55073a7ee33b3d8b29b6e149fdd0221b05158 (patch)
tree56ee29b2d660741c6e6ea659b92e9da42b5b48cf /libexec
parent9066ad3cb5870c3dabff0da5152982bb5fce4159 (diff)
downloadFreeBSD-src-1ec55073a7ee33b3d8b29b6e149fdd0221b05158.zip
FreeBSD-src-1ec55073a7ee33b3d8b29b6e149fdd0221b05158.tar.gz
- Change parameters of signal handlers in order to be correct (they are
handed a integer, not void). - No need to set flags to zero when they already will be. - It was also noted the manner in which the signal handling has changed might possibly generate some problems (hangs possibly) -- these, while remaining in the code, will be fixed shortly (within a day). Submitted by: bde
Diffstat (limited to 'libexec')
-rw-r--r--libexec/xtend/xtend.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/libexec/xtend/xtend.c b/libexec/xtend/xtend.c
index d7df02f..c136d63 100644
--- a/libexec/xtend/xtend.c
+++ b/libexec/xtend/xtend.c
@@ -81,9 +81,9 @@ void dopipe __P((void));
void doterm __P((void));
void initstatus __P((void));
void logpacket __P((unsigned char *));
-void onhup __P((void));
-void onpipe __P((void));
-void onterm __P((void));
+void onhup __P((int));
+void onpipe __P((int));
+void onterm __P((int));
void processpacket __P((unsigned char *));
int user_command __P((void));
@@ -229,12 +229,9 @@ char *argv[];
* Return here on SIGHUP after closing and reopening log file.
* Also on SIGPIPE after closing user connection.
*/
- term_flag = 0;
- hup_flag = 0;
- pipe_flag = 0;
- signal(SIGTERM, (sig_t)onterm);
- signal(SIGHUP, (sig_t)onhup);
- signal(SIGPIPE, (sig_t)onpipe);
+ signal(SIGHUP, onhup);
+ signal(SIGPIPE, onpipe);
+ signal(SIGTERM, onterm);
setjmp(mainloop);
/*
@@ -337,19 +334,19 @@ char *thedate(void)
return(cp);
}
-void onhup(void)
+void onhup(int signo)
{
hup_flag = 1;
}
-void onterm(void)
+void onterm(int signo)
{
term_flag = 1;
}
-void onpipe(void)
+void onpipe(int signo)
{
pipe_flag = 1;
OpenPOWER on IntegriCloud