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	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);
--- 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.
--- 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.
 
--- 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;
 	    }
--- 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: