mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
Readd the terminal flag for jobs, as not all jobs under job control should be given the terminal.
darcs-hash:20060201122715-ac50b-7efc499e8905e9898c214816d0a3468e077c7005.gz
This commit is contained in:
26
proc.c
26
proc.c
@@ -880,9 +880,8 @@ void job_continue (job_t *j, int cont)
|
||||
|
||||
if( !job_is_completed( j ) )
|
||||
{
|
||||
if( j->job_control && j->fg )
|
||||
if( j->terminal && j->fg )
|
||||
{
|
||||
|
||||
/* Put the job into the foreground. */
|
||||
signal_block();
|
||||
if( tcsetpgrp (0, j->pgid) )
|
||||
@@ -916,15 +915,28 @@ void job_continue (job_t *j, int cont)
|
||||
if( cont )
|
||||
{
|
||||
process_t *p;
|
||||
|
||||
for( p=j->first_process; p; p=p->next )
|
||||
p->stopped=0;
|
||||
for( p=j->first_process; p; p=p->next )
|
||||
|
||||
if( j->job_control )
|
||||
{
|
||||
if (kill ( p->pid, SIGCONT) < 0)
|
||||
if( killpg( j->pgid, SIGCONT ) )
|
||||
{
|
||||
wperror (L"kill (SIGCONT)");
|
||||
wperror( L"killpg (SIGCONT)" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for( p=j->first_process; p; p=p->next )
|
||||
{
|
||||
if (kill ( p->pid, SIGCONT) < 0)
|
||||
{
|
||||
wperror (L"kill (SIGCONT)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1007,7 +1019,7 @@ void job_continue (job_t *j, int cont)
|
||||
/*
|
||||
Put the shell back in the foreground.
|
||||
*/
|
||||
if( j->job_control && j->fg )
|
||||
if( j->terminal && j->fg )
|
||||
{
|
||||
signal_block();
|
||||
if( tcsetpgrp (0, getpid()) )
|
||||
|
||||
Reference in New Issue
Block a user