From 262bf58c3a3a0c7fa9b2833a114c5f43ef00f0b8 Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Thu, 14 Mar 2002 15:47:32 +0000 Subject: call siginterrupt() (from theo) --- usr.bin/sectok/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'usr.bin/sectok') 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); -- cgit v1.2.3