summaryrefslogtreecommitdiff
path: root/usr.bin/sectok/main.c
diff options
context:
space:
mode:
authorJim Rees <rees@cvs.openbsd.org>2002-03-14 15:47:32 +0000
committerJim Rees <rees@cvs.openbsd.org>2002-03-14 15:47:32 +0000
commit262bf58c3a3a0c7fa9b2833a114c5f43ef00f0b8 (patch)
treeb39f27f43e48e9955433121bdbe22a0d60498a6d /usr.bin/sectok/main.c
parent9407d727dd21cbd70a9d0a477901479d408f2007 (diff)
call siginterrupt() (from theo)
Diffstat (limited to 'usr.bin/sectok/main.c')
-rw-r--r--usr.bin/sectok/main.c10
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);