diff options
Diffstat (limited to 'Src/jobs.c')
-rw-r--r-- | Src/jobs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index 8c4254ad1..c6e1bce15 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -2779,8 +2779,11 @@ void release_pgrp(void) { if (origpgrp != mypgrp) { - attachtty(origpgrp); - setpgrp(0, origpgrp); + /* in linux pid namespaces, origpgrp may never have been set */ + if (origpgrp) { + attachtty(origpgrp); + setpgrp(0, origpgrp); + } mypgrp = origpgrp; } } |