| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Timeouts did not work correctly on windows because we do not kill or
abandon the process.
What was happening was a timeout condition was getting correctly detected,
and an exception was being raised. However, before the exception could
propogate, whatever the process was writing was fully read until it closed its FD.
|
|/
|
|
|
| |
The windows module was looking to write stdout to live_stream
instead of live_stdout.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
aix getpgid fails when called from parent and parent and child have different session
|
| | |
|
| | |
|
| |
| |
| |
| | |
now that we no longer support ruby 1.8.7 its time to retire this
|
| | |
|
| | |
|
|/
|
|
| |
method, aix removed method was slow.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
[#MIXLIB-19] Copy stderr to live_stream along with stdout of the subprocess
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Originally we needed this hack for 1.8.6 and 1.8.7, which were the most
common versions in use at the time. 1.8.6 is dead so we don't need to
account for it any more, which leaves 1.8.7 as the only case we need to
care about for this hack. On Ruby 1.9 and greater this hack isn't needed
and causes memory bloat for very long running shell commands.
|
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
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.
|
|
|
|
|
|
|
|
| |
This is a compromise that prevents us from leaving zombie processes
around after a failed exec raises ENOENT, but prevents us from blocking
(possibly forever) on timed-out commands. The latter case can cause
zombies, so this is not optimal for all cases. See MIXLIB-16 for a
proposed enhancement to solve that case.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
LC_ALL is set to nil in the :environment setting.
|
|
|
|
|
|
| |
- Unsure how File.for_fd() succeeds and then then #close on the File
throws this, but it must be racing with something. I don't think
we care.
|