mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
Be more rigorous with the exit codes set by the parser and builtins
darcs-hash:20061009012102-ac50b-4f28c43dd1ccdcc04d1620a6da05218a99fd7337.gz
This commit is contained in:
8
exec.c
8
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user