diff src/pager.cc @ 2475:1d7925d6bede

[project @ 1996-11-07 04:36:00 by jwe]
author jwe
date Thu, 07 Nov 1996 04:46:54 +0000
parents 00998e1442ae
children 4de4cebed088
line wrap: on
line diff
--- a/src/pager.cc	Wed Nov 06 19:16:08 1996 +0000
+++ b/src/pager.cc	Thu Nov 07 04:46:54 1996 +0000
@@ -102,13 +102,22 @@
     {
       if (WIFEXITED (status) || WIFSIGNALLED (status))
 	{
-	  octave_pager_pid = -1;
+	  if (external_pager)
+	    clear_external_pager ();
 
 	  // Don't call error() here because we don't want to set
 	  // the error state.
 
-	  warning ("connection to external pager lost --");
-	  warning ("pending computations and output have been discarded");
+	  // XXX FIXME XXX -- something is wrong with the way that
+	  // we are cleaning up the pager in the event of a SIGCHLD.
+	  // If this message is printed with warning(), we eventually
+	  // crash.
+
+	  cout
+	    << "warning: connection to external pager (pid = "
+	    << pid << ") lost --" << endl
+	    << "warning: pending computations and output have been discarded"
+	    << endl;
 	}
     }
 }
@@ -209,11 +218,11 @@
 			       && ! Vpage_output_immediately
 			       && ! more_than_a_screenful (buf)));
 
+      seekoff (0, ios::beg);
+
       do_sync (buf, bypass_pager);
 
       octave_diary << buf;
-
-      seekoff (0, ios::beg);
     }
 
   return 0;