Mercurial > hg > octave-terminal
changeset 1443:cd6c9be7337c
[project @ 1995-09-19 21:54:56 by jwe]
author | jwe |
---|---|
date | Tue, 19 Sep 1995 21:58:28 +0000 |
parents | 4f2e40ba7f77 |
children | 6fadc0c560c9 |
files | src/help.cc src/oct-hist.cc src/octave.cc src/pager.cc src/sighandlers.h |
diffstat | 5 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/help.cc +++ b/src/help.cc @@ -545,11 +545,11 @@ cmd_str = cmd_buf.str (); volatile sig_handler *old_sigint_handler; - old_sigint_handler = signal (SIGINT, SIG_IGN); + old_sigint_handler = octave_set_signal_handler (SIGINT, SIG_IGN); status = system (cmd_str); - signal (SIGINT, old_sigint_handler); + octave_set_signal_handler (SIGINT, old_sigint_handler); if ((status & 0xff) == 0) status = (signed char) ((status & 0xff00) >> 8);
--- a/src/oct-hist.cc +++ b/src/oct-hist.cc @@ -547,9 +547,12 @@ // Ignore interrupts while we are off editing commands. Should we // maybe avoid using system()? - volatile sig_handler *saved_sigint_handler = signal (SIGINT, SIG_IGN); + volatile sig_handler *saved_sigint_handler + = octave_set_signal_handler (SIGINT, SIG_IGN); + system (cmd); - signal (SIGINT, saved_sigint_handler); + + octave_set_signal_handler (SIGINT, saved_sigint_handler); // Write the commands to the history file since parse_and_execute // disables command line history while it executes.
--- a/src/octave.cc +++ b/src/octave.cc @@ -700,7 +700,8 @@ // Allow the user to interrupt us without exiting. - volatile sig_handler *saved_sigint_handler = signal (SIGINT, SIG_IGN); + volatile sig_handler *saved_sigint_handler + = octave_set_signal_handler (SIGINT, SIG_IGN); if (setjmp (toplevel) != 0) { @@ -711,7 +712,7 @@ can_interrupt = 1; - signal (SIGINT, saved_sigint_handler); + octave_set_signal_handler (SIGINT, saved_sigint_handler); // The big loop.
--- a/src/pager.cc +++ b/src/pager.cc @@ -150,14 +150,14 @@ if (pager_stream) { volatile sig_handler *old_sigint_handler; - old_sigint_handler = signal (SIGINT, SIG_IGN); + old_sigint_handler = octave_set_signal_handler (SIGINT, SIG_IGN); pager_stream << message; delete [] message; pager_stream.flush (); pager_stream.close (); - signal (SIGINT, old_sigint_handler); + octave_set_signal_handler (SIGINT, old_sigint_handler); return; }