diff options
author | gabor <gabor@FreeBSD.org> | 2010-06-06 11:36:08 +0000 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2010-06-06 11:36:08 +0000 |
commit | 1a0d1f33835b644df56baa59f295df363e168874 (patch) | |
tree | f8976692f4439333d24defe632c7d5892cfbdc2f /usr.bin/bc | |
parent | 76c8a3922dee033069971e3d1c1f0a54b42fe9b5 (diff) | |
download | FreeBSD-src-1a0d1f33835b644df56baa59f295df363e168874.zip FreeBSD-src-1a0d1f33835b644df56baa59f295df363e168874.tar.gz |
- Fix signal handling in bc/dc. Now Ctrl-C terminates the execution.
Requested by: gk (via private mail)
Approved by: delphij (mentor)
Diffstat (limited to 'usr.bin/bc')
-rw-r--r-- | usr.bin/bc/scan.l | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/usr.bin/bc/scan.l b/usr.bin/bc/scan.l index 0de6dc8..1f81893 100644 --- a/usr.bin/bc/scan.l +++ b/usr.bin/bc/scan.l @@ -23,7 +23,6 @@ __FBSDID("$FreeBSD$"); #include <err.h> #include <errno.h> #include <histedit.h> -#include <signal.h> #include <stdbool.h> #include <string.h> #include <unistd.h> @@ -235,22 +234,6 @@ add_str(const char *str) strlcat(strbuf, str, strbuf_sz); } -/* ARGSUSED */ -void -abort_line(int sig) -{ - static const char str[] = "[\n]P\n"; - int save_errno; - - switch (sig) { - default: - save_errno = errno; - YY_FLUSH_BUFFER; /* XXX signal race? */ - write(STDOUT_FILENO, str, sizeof(str) - 1); - errno = save_errno; - } -} - int yywrap(void) { @@ -288,8 +271,6 @@ yywrap(void) } else if (fileindex == sargc) { fileindex++; yyin = stdin; - if (interactive) - signal(SIGINT, abort_line); lineno = 1; filename = "stdin"; return (0); |