diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2014-12-17 21:12:42 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2014-12-18 18:58:25 -0800 |
commit | bf075b9e0d55ffc36a5beaa64b1b3838d20fa57f (patch) | |
tree | 9c3c17d8ed2bc0f39f361b7e341d2bea31f199c8 | |
parent | ecef922df15c9c315be48871a59b311bd2477f3c (diff) | |
download | zsh-bf075b9e0d55ffc36a5beaa64b1b3838d20fa57f.tar.gz zsh-bf075b9e0d55ffc36a5beaa64b1b3838d20fa57f.tar.xz zsh-bf075b9e0d55ffc36a5beaa64b1b3838d20fa57f.zip |
33992: do not attempt attachtty() for process group zero (which is possible in a linux pid namespace)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/jobs.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index d4c27f50d..24f23bce4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,13 @@ remove completion as the version supplied with docker is authoritative. +2014-12-17 Barton E. Schaefer <schaefer@zsh.org> + + * 34002: Src/Zle/zle_keymap.c: zshcalloc() in init_keymaps() + + * 33992: Src/jobs.c: do not attempt attachtty() for process group + zero (which is possible in a linux pid namespace) + 2014-12-18 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> * 33978: Src/Zle/complist.c: update command line when accept- 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; } } |