summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-03-18 21:05:51 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-03-18 21:05:51 +0000
commitb9ee804aab8e9465bcf1a1c3be61fc5c90963c63 (patch)
tree090cac6daafaba10140dc0c134356f47c34d49db
parente480249fb49adf26f39d42e3d1207d600233a6e8 (diff)
Forgotten part in previous commit; having multiple source trees is a
dangerous hobbby.
-rw-r--r--usr.bin/bc/bc.y11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y
index ae607d75952..30396f0289c 100644
--- a/usr.bin/bc/bc.y
+++ b/usr.bin/bc/bc.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: bc.y,v 1.28 2006/03/18 20:44:43 otto Exp $ */
+/* $OpenBSD: bc.y,v 1.29 2006/03/18 21:05:50 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: bc.y,v 1.28 2006/03/18 20:44:43 otto Exp $";
+static const char rcsid[] = "$OpenBSD: bc.y,v 1.29 2006/03/18 21:05:50 otto Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -286,8 +286,11 @@ statement : expression
putchar('q');
fflush(stdout);
- sigprocmask(SIG_BLOCK, NULL, &mask);
- sigsuspend(&mask);
+ if (dc) {
+ sigprocmask(SIG_BLOCK, NULL, &mask);
+ sigsuspend(&mask);
+ } else
+ exit(0);
}
| RETURN return_expression
{