Fix bug that caused shellscript functions in pipelines that don't have any output to never be properly removed

darcs-hash:20060129220414-ac50b-8c26e83933a73ef146c28bed020a6a2dfeca425f.gz
This commit is contained in:
axel 2006-01-30 08:04:14 +10:00
parent 003c4d776f
commit 3efb0bf5cf

11
exec.c
View file

@ -1016,7 +1016,7 @@ void exec( job_t *j )
if( !io_buffer )
{
/*
No buffer, se we exit directly. This means we
No buffer, so we exit directly. This means we
have to manually set the exit status.
*/
if( p->next == 0 )
@ -1068,6 +1068,15 @@ void exec( job_t *j )
}
}
else
{
if( p->next == 0 )
{
proc_set_last_status( j->negate?(status?0:1):status);
}
p->completed = 1;
}
io_buffer_destroy( io_buffer );