diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sectok/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/sectok/main.c b/usr.bin/sectok/main.c index 6643f407afa..afd107e258d 100644 --- a/usr.bin/sectok/main.c +++ b/usr.bin/sectok/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.6 2001/10/02 16:22:40 rees Exp $ */ +/* $Id: main.c,v 1.7 2002/03/14 15:47:31 rees Exp $ */ /* * Smartcard commander. @@ -113,6 +113,9 @@ char *av[]; /* Interactive mode, or script file */ signal(SIGINT, onintr); +#ifdef __OpenBSD__ + siginterrupt(SIGINT, 1); +#endif /* The Main Loop */ while (1) { @@ -126,12 +129,11 @@ char *av[]; } if (!fgets(buf, sizeof buf, cmdf)) { + putchar('\n'); if (interrupted) continue; - else { - putchar('\n'); + else break; - } } if (cmdf != stdin) printf("sectok> %s", buf); |