From e685f977341667e42101ff6ef046931f00696990 Mon Sep 17 00:00:00 2001 From: gwojda Date: Wed, 15 Mar 2017 11:25:27 +0100 Subject: [PATCH] job control notification correction invalid read --- 42sh/src/job-control/do_job_notification.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/42sh/src/job-control/do_job_notification.c b/42sh/src/job-control/do_job_notification.c index 2ea310d1..4f7a079d 100644 --- a/42sh/src/job-control/do_job_notification.c +++ b/42sh/src/job-control/do_job_notification.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* do_job_notification.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: jhalford +#+ +:+ +#+ */ +/* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 13:01:19 by jhalford #+# #+# */ -/* Updated: 2017/03/10 12:40:35 by jhalford ### ########.fr */ +/* Updated: 2017/03/15 11:24:23 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,7 +32,11 @@ int do_job_notification(void) ret = 1; job_notify_change(j->id); if (job_is_completed(j->id)) + { + jlist = jlist->next; job_remove(j->id); + continue ; + } else j->attrs |= JOB_NOTIFIED; }