aboutsummaryrefslogtreecommitdiffhomepage
path: root/event.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-11-02 23:48:59 +1000
committerGravatar axel <axel@liljencrantz.se>2006-11-02 23:48:59 +1000
commit13a85ee3f1bd292be5b8587f120674bc332a671a (patch)
tree563baff803ba995b2cb4903ec5984d8c3bb3f9ba /event.c
parentfab18bae80c5beb177f9a97f9ae2f05c5654de16 (diff)
Make sure fish has the currect exit status
darcs-hash:20061102134859-ac50b-692f9e9aff838ea375e5cf29eeae1e29b1b75338.gz
Diffstat (limited to 'event.c')
-rw-r--r--event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/event.c b/event.c
index 2df1e79d..4685c6aa 100644
--- a/event.c
+++ b/event.c
@@ -444,7 +444,8 @@ static void event_fire_internal( event_t *event )
for( i=0; i<al_get_count( fire ); i++ )
{
event_t *criterion = (event_t *)al_get( fire, i );
-
+ int prev_status;
+
/*
Check if this event has been removed, if so, dont fire it
*/
@@ -476,11 +477,13 @@ static void event_fire_internal( event_t *event )
they are marked as non-interactive
*/
proc_push_interactive(0);
+ prev_status = proc_get_last_status();
parser_push_block( EVENT );
current_block->param1.event = event;
eval( (wchar_t *)b->buff, 0, TOP );
parser_pop_block();
proc_pop_interactive();
+ proc_set_last_status( prev_status );
}
if( b )