aboutsummaryrefslogtreecommitdiffhomepage
path: root/input.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-01-18 22:42:48 +1000
committerGravatar axel <axel@liljencrantz.se>2006-01-18 22:42:48 +1000
commit05736978bb5621d33d9b34467a278f6cca095940 (patch)
tree10e9fac3ccd0684c45bb13825c08540d48082242 /input.c
parente15c7fd7e0e2459369241166e959f35c2c22bf4f (diff)
Change the foregrounf/background code a bit, fixes bug where mulktiple jobs want foreground status. Is this fix enough or are there still corner cases?
darcs-hash:20060118124248-ac50b-cbbddb8c6dad1f44826050395cda647fa9348f0f.gz
Diffstat (limited to 'input.c')
-rw-r--r--input.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/input.c b/input.c
index 3dc70168..8da2fa62 100644
--- a/input.c
+++ b/input.c
@@ -1292,12 +1292,32 @@ static int interrupt_handler()
Fire any pending events
*/
event_fire( 0 );
+
+ /*
+ Reap stray processes, including printing exit status messages
+ */
if( job_reap( 1 ) )
repaint();
+
+ /*
+ Check if we should exit
+ */
+ if( exit_status() )
+ {
+ return R_EXIT;
+ }
+
+ /*
+ Tell the reader an event occured
+ */
if( reader_interupted() )
{
+ /*
+ Return 3, i.e. the character read by a Control-C.
+ */
return 3;
}
+
return 0;
}