aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-10-09 11:21:02 +1000
committerGravatar axel <axel@liljencrantz.se>2006-10-09 11:21:02 +1000
commita074cd62bccf9a163d970d77d0c3ba86166045de (patch)
tree31072cfb44e432d4641e0fb4c87671f299425cd5 /exec.c
parent7a8b46816556339059878cf62dbe142552de953a (diff)
Be more rigorous with the exit codes set by the parser and builtins
darcs-hash:20061009012102-ac50b-4f28c43dd1ccdcc04d1620a6da05218a99fd7337.gz
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/exec.c b/exec.c
index 842722d1..bd4440bd 100644
--- a/exec.c
+++ b/exec.c
@@ -578,7 +578,7 @@ static void internal_exec_helper( const wchar_t *def,
*/
if( io && !io_internal )
{
- proc_set_last_status( 1 );
+ proc_set_last_status( STATUS_EXEC_FAIL );
return;
}
@@ -1041,7 +1041,7 @@ void exec( job_t *j )
*/
if( p->next == 0 )
{
- proc_set_last_status( j->negate?(status?0:1):status);
+ proc_set_last_status( j->negate?(!status):status);
}
p->completed = 1;
break;
@@ -1091,7 +1091,7 @@ void exec( job_t *j )
{
if( p->next == 0 )
{
- proc_set_last_status( j->negate?(status?0:1):status);
+ proc_set_last_status( j->negate?(!status):status);
}
p->completed = 1;
}
@@ -1182,7 +1182,7 @@ void exec( job_t *j )
{
debug( 3, L"Set status of %ls to %d using short circut", j->command, p->status );
- proc_set_last_status( j->negate?(p->status?0:1):p->status );
+ proc_set_last_status( j->negate?(!p->status):p->status );
}
break;