diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/appl/bsd/ChangeLog | 7 | ||||
| -rw-r--r-- | src/appl/bsd/krlogin.c | 11 |
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) { |
