summaryrefslogtreecommitdiffstats
path: root/src/appl
diff options
context:
space:
mode:
authorMark Eichin <eichin@mit.edu>1995-01-11 00:44:56 +0000
committerMark Eichin <eichin@mit.edu>1995-01-11 00:44:56 +0000
commit1d40b90e5f43a8aa8667a8ee37274b4d5ec02cb0 (patch)
tree299b01befe735155017c675e3a905596efe01153 /src/appl
parentdc0231d831cd8954c5d572bd811a54b7954336e3 (diff)
downloadkrb5-1d40b90e5f43a8aa8667a8ee37274b4d5ec02cb0.tar.gz
krb5-1d40b90e5f43a8aa8667a8ee37274b4d5ec02cb0.tar.xz
krb5-1d40b90e5f43a8aa8667a8ee37274b4d5ec02cb0.zip
* krlogin.c (doit): use exit_handler for signal exits, don't use
exit directly. (exit_handler): new function, avoids type collision from misusing exit directly as a signal handler. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4803 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl')
-rw-r--r--src/appl/bsd/ChangeLog7
-rw-r--r--src/appl/bsd/krlogin.c11
2 files changed, 15 insertions, 3 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog
index 59f82b62b..fad183171 100644
--- a/src/appl/bsd/ChangeLog
+++ b/src/appl/bsd/ChangeLog
@@ -1,3 +1,10 @@
+Tue Jan 10 19:43:18 1995 Mark Eichin (eichin@cygnus.com)
+
+ * krlogin.c (doit): use exit_handler for signal exits, don't use
+ exit directly.
+ (exit_handler): new function, avoids type collision from misusing
+ exit directly as a signal handler.
+
Tue Jan 10 15:23:31 1995 Richard Basch (probe@tardis)
* configure.in: Streams test needs to include sys/types.h
diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c
index d48e98133..b601b5f4f 100644
--- a/src/appl/bsd/krlogin.c
+++ b/src/appl/bsd/krlogin.c
@@ -168,7 +168,6 @@ struct sockaddr_in local, foreign;
struct termios deftty;
#endif
-krb5_sigtype exit();
char *getenv();
char *name;
@@ -223,6 +222,12 @@ krb5_sigtype lostpeer();
int setsignal(int sig, krb5_sigtype (*act)());
#endif
+/* to allow exits from signal handlers, without conflicting declarations */
+krb5_sigtype exit_handler() {
+ exit(1);
+}
+
+
/*
* The following routine provides compatibility (such as it is)
* between 4.2BSD Suns and others. Suns have only a `ttysize',
@@ -774,8 +779,8 @@ doit(oldmask)
(void) signal(SIGINT, SIG_IGN);
#endif
- setsignal(SIGHUP, exit);
- setsignal(SIGQUIT, exit);
+ setsignal(SIGHUP, exit_handler);
+ setsignal(SIGQUIT, exit_handler);
child = fork();
if (child == -1) {