diff --git a/42sh/src/job_control/put_job_in_foreground.c b/42sh/src/job_control/put_job_in_foreground.c index 22f79779..14878ae5 100644 --- a/42sh/src/job_control/put_job_in_foreground.c +++ b/42sh/src/job_control/put_job_in_foreground.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 14:58:36 by jhalford #+# #+# */ -/* Updated: 2017/03/24 17:24:24 by gwojda ### ########.fr */ +/* Updated: 2017/03/24 17:26:50 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,7 +20,12 @@ int put_job_in_foreground(t_job *j, int cont) if (SH_IS_INTERACTIVE(data_singleton()->opts)) tcsetpgrp(STDIN, j->pgid); if (cont) + { tcsetattr(STDIN, TCSADRAIN, &j->tmodes); + if (kill(-j->pgid, SIGCONT) < 0) + DG("kill(SIGCONT) failed"); + //msg d'erreur a changer ici + } job_wait(j->id); if (SH_IS_INTERACTIVE(data_singleton()->opts)) {