diff --git a/42sh/src/job-control/put_job_in_foreground.c b/42sh/src/job-control/put_job_in_foreground.c index 9b2af2f3..5237ed9b 100644 --- a/42sh/src/job-control/put_job_in_foreground.c +++ b/42sh/src/job-control/put_job_in_foreground.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* put_job_in_foreground.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: jhalford +#+ +:+ +#+ */ +/* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 14:58:36 by jhalford #+# #+# */ -/* Updated: 2017/03/13 17:37:04 by jhalford ### ########.fr */ +/* Updated: 2017/03/14 12:45:22 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,13 +29,13 @@ int put_job_in_foreground(t_job *j, int cont) DG("check"); job_wait(j->id); DG("check"); - job_remove(j->id); - DG("check"); if (SH_IS_INTERACTIVE(data_singleton()->opts)) { tcsetpgrp(STDIN, jobc->shell_pgid); tcgetattr(STDIN, &j->tmodes); tcsetattr(STDIN, TCSADRAIN, &jobc->shell_tmodes); } + job_remove(j->id); + DG("check"); return (0); }