| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
This is breaking on windows with ruby 2.0.0p645. The issue
seems to be that there is something at the fd, but it's not
the file descriptor from the parent.
Instead, we're now testing that both the fd exists and
the file contains the contents that were written
|
| |
|
| |
|
|\
| |
| | |
remove getpgrp back to setsid
|
| | |
|
|/ |
|
|\
| |
| | |
with_logon now simulates login in unix
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added:
* Secondary groups from etc files
* Set environment variables like `su` would
* Set primary group to user's primary group if no other group specified
All only if `login` is set
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
refelect that.
This fixes a spec that was broken on Windows by 767ea4fc19cb29a55a81a55d1a13643ae3108f4c
from PR https://github.com/opscode/mixlib-shellout/pull/58
It seems the Unix spec was updated to reflect this change, but the Windows was not
|
|\
| |
| | |
aix getpgid fails when called from parent and parent and child have different session
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
fixes travis failure that did not fail on my desktop
|
| |
| |
| |
| | |
now that we no longer support ruby 1.8.7 its time to retire this
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| | |
[#MIXLIB-19] Copy stderr to live_stream along with stdout of the subprocess
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
for the test.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Attempting to reproduce this in isolation hasn't worked. Add debug
information permanently so we may get a hint of why this test sometimes
fails if we see it again.
|
| |
| |
| |
| | |
allows the user to use custom error-handling logic. error! now uses error? internally.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is not a good way to reliably detect whether all grandchildren
have exited after sending a TERM to the process group; if the child has
correctly exited, grandchildren (which may be unresponsive) will have
been adopted by init (ppid == 1) so the parent cannot wait() on them. To
ensure no stuck grandchildren are left, send a KILL to the process group
after allowing the processes time to clean up.
|
| |
| |
| |
| |
| |
| |
| | |
To ensure that all child processes are properly signaled to exit before
forcibly killing them, use `setsid()` in the child process to give the
child (and any grandchildren it might create) a new and unique process
group. If the command times out, kill and reap the entire process group.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
/bin/sh on Ubuntu is dash, which does not support bash's behavior of
using exec to run a command (instead of fork) when possible. This means
that, when given a single string command, instead of an array of command
plus arguments, the process created by fork/exec is dash, and the ruby
program is a child process of dash. When shellout signals the child to
exit after a timeout, it will signal dash instead of the ruby program.
To avoid this issue, the command needs to be given as an Array to avoid
creating a subshell.
|
| |
| |
| |
| |
| | |
If no logger is configured, we still want to inform the user that the
process was killed (and how).
|
| |
| |
| |
| |
| | |
If a logger is configured, send `error` level messages about child
process termination for timeout violations.
|
| |
| |
| |
| |
| | |
removes some complexity that was introduced with the fix to kill
timed-out child processes
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes MIXLIB-16.
This issue is particularly prominent when yum/rpm commands go off the
deep end repeatedly, but affects any case where a process takes longer
than the timeout to complete.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ported the regression test from OHAI-455 to mixlib-shellout, which
revealed a race condition in the way shellout reaps the child after a
failed exec (most commonly caused by attempting to run a command that
doesn't exist). The call to waitpid2 used WNOHANG to avoid hanging
indefinitely if an error was caused but the child process was still
alive, but this results in the child process not getting reaped if it
exits after the call to waitpid2. In a single run of the stress test,
this occurred 94/100 times, so it is very likely that mixlib-shellout
will leak zombies for the ENOENT case without this change.
|
|
|
|
| |
not sure what this was, tests run fine without it.
|
| |
|
| |
|
| |
|
|
|
|
| |
LC_ALL is set to nil in the :environment setting.
|