This project is mirrored from Pull mirroring updated .
  1. 09 Dec, 2013 2 commits
    • danielsdeleo's avatar
      Always send KILL to process group · a4c67900
      danielsdeleo authored
      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.
    • danielsdeleo's avatar
      Run commands with unique pgid to improve timeout cleanup · b148f454
      danielsdeleo authored
      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.
  2. 06 Dec, 2013 2 commits
    • danielsdeleo's avatar
      Run timeout tests without a subshell · c195a3f6
      danielsdeleo authored
      /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.
    • danielsdeleo's avatar
      Remove -b from default rspec options · 28f2d211
      danielsdeleo authored
      RSpec seems to be much better at filtering nowadays and the extra lines
      are a PITA in development.
  3. 05 Dec, 2013 3 commits
  4. 04 Dec, 2013 1 commit
  5. 04 Nov, 2013 3 commits
  6. 02 Nov, 2013 1 commit
  7. 01 Nov, 2013 7 commits
  8. 24 Oct, 2013 1 commit
  9. 11 Oct, 2013 1 commit
  10. 27 Sep, 2013 1 commit
  11. 11 Sep, 2013 2 commits
    • danielsdeleo's avatar
      Fix MIXLIB-17 · e986fc3e
      danielsdeleo authored
    • danielsdeleo's avatar
      Use blocking waitpid only on ENOENT · ebe7f8e8
      danielsdeleo authored
      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.
  12. 10 Sep, 2013 2 commits
    • danielsdeleo's avatar
      Wait for child process to die in case of critical errors · 89f7f802
      danielsdeleo authored
      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.
    • danielsdeleo's avatar
      remove uneeded require · 4c1e6fee
      danielsdeleo authored
      not sure what this was, tests run fine without it.
  13. 19 Jul, 2013 1 commit
  14. 24 Jun, 2013 1 commit
  15. 20 Jun, 2013 6 commits
  16. 19 Jun, 2013 2 commits
  17. 15 Jun, 2013 2 commits
  18. 14 Jun, 2013 2 commits