aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-01-18 22:42:48 +1000
committerGravatar axel <axel@liljencrantz.se>2006-01-18 22:42:48 +1000
commit05736978bb5621d33d9b34467a278f6cca095940 (patch)
tree10e9fac3ccd0684c45bb13825c08540d48082242 /parser.c
parente15c7fd7e0e2459369241166e959f35c2c22bf4f (diff)
Change the foregrounf/background code a bit, fixes bug where mulktiple jobs want foreground status. Is this fix enough or are there still corner cases?
darcs-hash:20060118124248-ac50b-cbbddb8c6dad1f44826050395cda647fa9348f0f.gz
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/parser.c b/parser.c
index f1b72f05..b7d91408 100644
--- a/parser.c
+++ b/parser.c
@@ -1162,6 +1162,7 @@ static void parse_job_main_loop( process_t *p,
case TOK_BACKGROUND:
j->fg = 0;
+ j->terminal=0;
case TOK_END:
{
p->argv = list_to_char_arr( args );
@@ -1981,10 +1982,10 @@ static void eval_job( tokenizer *tok )
j->fg=1;
j->constructed=0;
j->skip_notification = is_subshell || is_block || is_event || (!is_interactive);
-
- current_block->job = j;
-
+ j->terminal = is_interactive && !is_subshell;
+ current_block->job = j;
+
if( is_interactive )
{
if( tcgetattr (0, &j->tmodes) )