# HG changeset patch # User jwe # Date 811547908 0 # Node ID cd6c9be7337ce8103029cd32c54dd8e1e0cdcc44 # Parent 4f2e40ba7f772f5b3cfea2b2f6edb1143de1a20a [project @ 1995-09-19 21:54:56 by jwe] diff -r 4f2e40ba7f77 -r cd6c9be7337c src/help.cc --- a/src/help.cc Tue Sep 19 21:40:51 1995 +0000 +++ b/src/help.cc Tue Sep 19 21:58:28 1995 +0000 @@ -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); diff -r 4f2e40ba7f77 -r cd6c9be7337c src/oct-hist.cc --- a/src/oct-hist.cc Tue Sep 19 21:40:51 1995 +0000 +++ b/src/oct-hist.cc Tue Sep 19 21:58:28 1995 +0000 @@ -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. diff -r 4f2e40ba7f77 -r cd6c9be7337c src/octave.cc --- a/src/octave.cc Tue Sep 19 21:40:51 1995 +0000 +++ b/src/octave.cc Tue Sep 19 21:58:28 1995 +0000 @@ -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. diff -r 4f2e40ba7f77 -r cd6c9be7337c src/pager.cc --- a/src/pager.cc Tue Sep 19 21:40:51 1995 +0000 +++ b/src/pager.cc Tue Sep 19 21:58:28 1995 +0000 @@ -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; } diff -r 4f2e40ba7f77 -r cd6c9be7337c src/sighandlers.h --- a/src/sighandlers.h Tue Sep 19 21:40:51 1995 +0000 +++ b/src/sighandlers.h Tue Sep 19 21:58:28 1995 +0000 @@ -43,6 +43,8 @@ // Nonzero means we can be interrupted. extern int can_interrupt; +extern sig_handler *octave_set_signal_handler (int, sig_handler *); + extern void install_signal_handlers (void); // This is taken directly from Emacs 19: