summaryrefslogtreecommitdiff
path: root/lib/mixlib
diff options
context:
space:
mode:
authorkaustubh-d <kaustubh@clogeny.com>2014-08-27 22:51:46 +0530
committerkaustubh-d <kaustubh@clogeny.com>2014-08-27 22:51:46 +0530
commit1a1154e864c6b3e230ae9380c7178bf36a6958ca (patch)
treec2c0cf9b576b719b1838ba3e60be34d2d3ac766e /lib/mixlib
parent8d3f6bc696921b964b8b20c812e1da83714670ca (diff)
downloadmixlib-shellout-1a1154e864c6b3e230ae9380c7178bf36a6958ca.tar.gz
fix getpgid issue on aix
Diffstat (limited to 'lib/mixlib')
-rw-r--r--lib/mixlib/shellout/unix.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mixlib/shellout/unix.rb b/lib/mixlib/shellout/unix.rb
index be2e66a..bd9169f 100644
--- a/lib/mixlib/shellout/unix.rb
+++ b/lib/mixlib/shellout/unix.rb
@@ -305,7 +305,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