summaryrefslogtreecommitdiff
path: root/lib/mixlib
Commit message (Collapse)AuthorAgeFilesLines
* Remove dependency on windows-prjdm/no-windows-prJay Mundrawala2015-08-262-8/+9
| | | | | windows-pr includes everything under the sun. This is means it does not work no nanoserver
* bump version to 2.1.02.1.0Lamont Granquist2015-05-181-1/+1
|
* Merge pull request #94 from chef/lcg/no-getpgrpLamont Granquist2015-05-151-25/+8
|\ | | | | remove getpgrp back to setsid
| * remove getpgrp back to setsidlcg/no-getpgrpLamont Granquist2015-05-151-25/+8
| |
* | Fix 2 ruby warnings for uninitialized variablesdanielsdeleo2015-05-152-0/+2
|/
* Merge pull request #78 from BackSlasher/add-loginLamont Granquist2015-05-142-4/+67
|\ | | | | with_logon now simulates login in unix
| * Added TODO for next majorNitz2015-02-151-0/+3
| |
| * Option "login" now simulates login in unixNitz2015-02-152-4/+64
| | | | | | | | | | | | | | | | | | 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
* | Bumped version to 2.0.1Jay Mundrawala2014-12-191-1/+1
| |
* | On windows, send sigkill to process if it exceeds its alloted timeJay Mundrawala2014-12-181-0/+6
| | | | | | | | | | | | | | | | | | 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.
* | Fix live_stream for windowsJay Mundrawala2014-12-171-1/+1
|/ | | | | The windows module was looking to write stdout to live_stream instead of live_stdout.
* Document input and live stream options to `new`danielsdeleo2014-11-241-0/+11
|
* Block until child stream is emptyryan/issue_2062_12Ryan Cragun2014-10-311-1/+1
|
* Remove child process pipe from open pipes when the stream is closedRyan Cragun2014-10-311-0/+1
|
* Rescue ArgumentError on Marshal.load of buffered child statusRyan Cragun2014-10-311-1/+1
|
* Add buffering to the process status pipeRyan Cragun2014-10-312-8/+17
|
* Bump version number after 2.0.0 branching.Serdar Sutay2014-10-271-1/+1
|
* Merge pull request #57 from ClogenyTechnologies/kd/processgrp-fixlamont-granquist2014-09-111-1/+4
|\ | | | | aix getpgid fails when called from parent and parent and child have different session
| * fix getpgid issue on aixkaustubh-d2014-08-271-1/+4
| |
* | bumping version to 2.0.0.rc.0Lamont Granquist2014-09-051-1/+1
| |
* | remove LC_ALL default environment variableLamont Granquist2014-08-282-16/+4
| | | | | | | | now that we no longer support ruby 1.8.7 its time to retire this
* | aix does not allow resetting real uid once the euid is changed to non-root.kaustubh-d2014-08-271-1/+1
| |
* | remove #clean_parent_file_descriptors which is not required now.kaustubh-d2014-08-251-27/+0
| |
* | clean_parent_file_descriptors can be achieve with close_others flag to exec ↵kaustubh-d2014-08-251-1/+1
|/ | | | method, aix removed method was slow.
* Bump version number for RC release.1.6.0.rc.0Serdar Sutay2014-08-081-1/+1
|
* Simplify live_stream vs live_stdout vs live_stderr based on PR commentsMax Lincoln2014-07-173-26/+25
|
* Support separate live stream for stderrMax Lincoln2014-07-173-4/+24
|
* AIX returns Errno::EPERM hereLamont Granquist2014-07-081-1/+1
|
* Correct spelling in spec filesTyler Cipriani2014-05-161-1/+1
|
* Correct spelling of "exceeded"Tyler Cipriani2014-05-151-2/+2
|
* Merge pull request #26 from akshaykarle/masterSerdar Sutay2014-05-133-4/+7
|\ | | | | [#MIXLIB-19] Copy stderr to live_stream along with stdout of the subprocess
| * Add stderr to live_stream.Akshay Karle2013-09-263-4/+7
| |
* | Bump version number post release.sersut2014-04-081-1/+1
| |
* | Bump the version number for release.1.4.01.4-stablesersut2014-04-081-1/+1
| |
* | Bump the version number for RC release.1.4.0.rc.1sersut2014-03-311-1/+1
| |
* | Handle ESRCH when getting pgid of a zombie on OS Xdanielsdeleo2014-03-311-1/+17
| |
* | Bump the version number for RC release.1.4.0.rc.0sersut2014-03-301-1/+1
| |
* | Handle leak fix for leaked token handle, avoid double closeadamedx2014-03-172-16/+25
| |
* | Only close handles that are set to a valid handle valueAdam Edwards2014-03-171-3/+3
| |
* | Retire the GC disable hack for all but ruby 1.8.7danielsdeleo2014-03-071-4/+9
| | | | | | | | | | | | | | | | 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.
* | Adds error? method to check whether the process exited successfully. This ↵Chris Armstrong2014-01-211-8/+12
| | | | | | | | allows the user to use custom error-handling logic. error! now uses error? internally.
* | Always send KILL to process groupdanielsdeleo2013-12-091-32/+10
| | | | | | | | | | | | | | | | | | 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.
* | Run commands with unique pgid to improve timeout cleanupdanielsdeleo2013-12-091-6/+59
| | | | | | | | | | | | | | 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.
* | Bump the version number for release.1.3.0sersut2013-12-031-1/+1
| |
* | Add termination info to error messagesdanielsdeleo2013-11-042-1/+5
| | | | | | | | | | If no logger is configured, we still want to inform the user that the process was killed (and how).
* | Add logging about timed-out cmd termination when possibledanielsdeleo2013-11-041-0/+2
| | | | | | | | | | If a logger is configured, send `error` level messages about child process termination for timeout violations.
* | Cleanup control flow in main loopdanielsdeleo2013-11-011-13/+13
| | | | | | | | | | removes some complexity that was introduced with the fix to kill timed-out child processes
* | Force subprocess to exit after timeoutdanielsdeleo2013-11-011-17/+52
|/ | | | | | | | 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.
* Use blocking waitpid only on ENOENTdanielsdeleo2013-09-111-2/+10
| | | | | | | | 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.
* Wait for child process to die in case of critical errorsdanielsdeleo2013-09-091-1/+1
| | | | | | | | | | | | 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.