Mercurial > hg > octave-nkf
comparison src/pager.cc @ 2795:14d07e4a0265
[project @ 1997-03-07 02:18:49 by jwe]
author | jwe |
---|---|
date | Fri, 07 Mar 1997 02:21:37 +0000 |
parents | 18395aaeafb7 |
children | 8b262e771614 |
comparison
equal
deleted
inserted
replaced
2794:b836945228cc | 2795:14d07e4a0265 |
---|---|
103 { | 103 { |
104 if (pid > 0) | 104 if (pid > 0) |
105 { | 105 { |
106 if (WIFEXITED (status) || WIFSIGNALLED (status)) | 106 if (WIFEXITED (status) || WIFSIGNALLED (status)) |
107 { | 107 { |
108 if (external_pager) | 108 // Avoid warning() or error(), since that will put us back in |
109 clear_external_pager (); | 109 // the pager, which would be bad news. |
110 | 110 |
111 // Don't call error() here because we don't want to set | 111 cerr << "warning: connection to external pager (pid = " |
112 // the error state. | 112 << pid << ") lost --\n" |
113 | 113 << "warning: attempting to finish pending computations...\n"; |
114 // XXX FIXME XXX -- something is wrong with the way that | |
115 // we are cleaning up the pager in the event of a SIGCHLD. | |
116 // If this message is printed with warning(), we eventually | |
117 // crash. | |
118 | |
119 cout << "warning: connection to external pager (pid = " | |
120 << pid << ") lost --" << endl | |
121 << "warning: pending computations and output may be lost" | |
122 << endl; | |
123 } | 114 } |
124 } | 115 } |
125 } | 116 } |
126 | 117 |
127 static void | 118 static void |
169 | 160 |
170 if (octave_pager_pid > 0 | 161 if (octave_pager_pid > 0 |
171 && external_pager | 162 && external_pager |
172 && external_pager->good ()) | 163 && external_pager->good ()) |
173 external_pager->flush (); | 164 external_pager->flush (); |
165 } | |
166 else | |
167 { | |
168 // We had a pager, but it must have died. Restore | |
169 // the interrupt state so we can escape back to the | |
170 // prompt if there are lots of computations pending. | |
171 | |
172 if (interrupt_handler_saved) | |
173 { | |
174 octave_set_interrupt_handler (saved_interrupt_handler); | |
175 interrupt_handler_saved = false; | |
176 } | |
174 } | 177 } |
175 } | 178 } |
176 else | 179 else |
177 { | 180 { |
178 cout << msg; | 181 cout << msg; |