This commit is contained in:
Jack Halford 2017-03-24 15:41:30 +01:00
parent 01daa9995e
commit 1ba52fff84
3 changed files with 8 additions and 3 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/14 16:47:00 by jhalford #+# #+# */
/* Updated: 2017/03/24 15:10:44 by jhalford ### ########.fr */
/* Updated: 2017/03/24 15:36:34 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/15 17:43:01 by jhalford #+# #+# */
/* Updated: 2017/03/24 15:12:22 by jhalford ### ########.fr */
/* Updated: 2017/03/24 15:39:48 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/20 11:37:40 by jhalford #+# #+# */
/* Updated: 2017/03/20 20:51:54 by jhalford ### ########.fr */
/* Updated: 2017/03/24 15:40:55 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -20,11 +20,16 @@ void job_hup_all(void)
jobc = &data_singleton()->jobc;
jlist = jobc->first_job;
if (!SH_HAS_JOBC(data_singleton()->opts))
return ;
while (jlist)
{
job = jlist->content;
DG("gonna SIGHUP %i", job->pgid);
builtin_jobs(NULL, NULL, NULL);
if (job->pgid != 1)
kill(-job->pgid, SIGHUP);
DG("after SIGHUP %i", job->pgid);
jlist = jlist->next;
}
}