rtomayko/posix-spawn — pull request #58 by piki (2014-06-30 03:05:11+00:00)
Title: Fix three real bugs and a pile of broken unit tests

Added sanity checks for invalid `:chdir` (needed a new test) and `fd => :close` (fixed an existing test) options.

Stop ignoring SIGPIPE. Fixes two hung tests on OS X. Without this fix, `yes` runs forever instead of dying with SIGPIPE.

Protect dup'd fds from being closed on exec, in both `pspawn` and `fspawn`.

Removed a bashisms from 7 unit tests. They now pass with both `dash` (the default on modern Debian) and `bash` (still the default on OS X).

I have tested on:
- OS X 10.9.3 with Ruby 2.0.0
- Debian unstable with Ruby 1.9.3 and 2.1.2, and with `/bin/sh` symlinked to both `dash` and `bash`