mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
Rename the 'terminal' flag to 'job_control', make sure fg and bg only considers jobs under job control and make it configurable which jobs are put under job control using the status builtin. Also add an option to the status builtin to print a stack trace.
darcs-hash:20060130175426-ac50b-46fb79797284cb600c67cb19462b53761446f00a.gz
This commit is contained in:
16
exec.c
16
exec.c
@@ -393,7 +393,7 @@ static int setup_child_process( job_t *j, process_t *p )
|
||||
{
|
||||
int res;
|
||||
|
||||
if( j->terminal )
|
||||
if( j->job_control )
|
||||
{
|
||||
pid_t pid;
|
||||
/*
|
||||
@@ -602,7 +602,7 @@ static void internal_exec_helper( const wchar_t *def,
|
||||
static int handle_new_child( job_t *j, process_t *p )
|
||||
{
|
||||
|
||||
if( j->terminal )
|
||||
if( j->job_control )
|
||||
{
|
||||
int new_pgid=0;
|
||||
|
||||
@@ -636,18 +636,6 @@ static int handle_new_child( job_t *j, process_t *p )
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if( j->fg && new_pgid)
|
||||
{
|
||||
if( tcsetpgrp (0, j->pgid) )
|
||||
{
|
||||
debug( 1, _( L"Could not send job %d ('%ls') to foreground" ),
|
||||
j->job_id,
|
||||
j->command );
|
||||
wperror( L"tcsetpgrp" );
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user