diff options
author | lamont-granquist <lamont@scriptkiddie.org> | 2014-09-11 12:32:13 -0700 |
---|---|---|
committer | lamont-granquist <lamont@scriptkiddie.org> | 2014-09-11 12:32:13 -0700 |
commit | 9c8f613128cdc14e214c8c2f896b75e507a61a4e (patch) | |
tree | d7ef525b8baed7770c8f24f4aa789cc5509e6cb5 /lib/mixlib/shellout/unix.rb | |
parent | 1a06d383c35db211c682a3077520dcb20cf4e5ef (diff) | |
parent | 2d9ec7727d2b3890ecd83c611ce09127a8b1724e (diff) | |
download | mixlib-shellout-9c8f613128cdc14e214c8c2f896b75e507a61a4e.tar.gz |
Merge pull request #57 from ClogenyTechnologies/kd/processgrp-fix
aix getpgid fails when called from parent and parent and child have different session
Diffstat (limited to 'lib/mixlib/shellout/unix.rb')
-rw-r--r-- | lib/mixlib/shellout/unix.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mixlib/shellout/unix.rb b/lib/mixlib/shellout/unix.rb index cd9790a..2bde64a 100644 --- a/lib/mixlib/shellout/unix.rb +++ b/lib/mixlib/shellout/unix.rb @@ -280,7 +280,10 @@ module Mixlib # support the "ONESHOT" optimization (where sh -c does exec without # forking). To support cleaning up all the children, we need to # ensure they're in a unique process group. - Process.setsid + # We cannot use setsid here since getpgid fails on AIX with EPERM + # when parent and child have different sessions and the parent tries to get the process group, + # hence we just create a new process group, and have the same session. + Process.setpgrp configure_subprocess_file_descriptors |