diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-14 20:53:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-14 20:53:04 +0000 |
commit | 61a9e9466575d53e69359f0609094787a9088258 (patch) | |
tree | 3977effa1aca35f7b364604f172f193e5362a000 | |
parent | 4f822908436b0a8cd55030f42d5557ff2512607f (diff) |
avoid stdio in a signal handler; millert ok
-rw-r--r-- | lib/libskey/skeysubr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libskey/skeysubr.c b/lib/libskey/skeysubr.c index 5a7d3da2fba..516f99c3ee3 100644 --- a/lib/libskey/skeysubr.c +++ b/lib/libskey/skeysubr.c @@ -9,7 +9,7 @@ * * S/Key misc routines. * - * $OpenBSD: skeysubr.c,v 1.20 2001/06/23 21:03:47 millert Exp $ + * $OpenBSD: skeysubr.c,v 1.21 2001/11/14 20:53:03 deraadt Exp $ */ #include <stdio.h> @@ -18,6 +18,7 @@ #include <ctype.h> #include <signal.h> #include <termios.h> +#include <unistd.h> #include <md4.h> #include <md5.h> #include <sha1.h> @@ -335,13 +336,12 @@ static void trapped(sig) int sig; { - (void)fputs("^C\n", stderr); - (void)fflush(stderr); + write(STDERR_FILENO, "^C\n", 3); /* Turn on echo if necesary */ skey_echo(1); - exit(-1); + _exit(-1); } /* |