alexdantas/acoc — pull request #5 by benoit-pierre (2014-07-04 13:30:27+00:00)
Title: Fix exit status handling and rewrite pseudo terminal support

* fix exit status handling:

For example, 'acoc make' will no correctly return 'make' exit code (including returning 128 + signal number if make was interrupted or killed):

```bash
> acoc make -f /dev/null foo; echo $?
make: *** No rule to make target 'foo'. Stop.
2
> ulimit -c unlimited; printf '$(shell exec kill -11 $$PPID)' | acoc make -f -; echo $?
acoc: segmentation fault (cored dumped): make -f -
139
```

* rewrite pseudo terminal support

Use tpty for Ruby 1.8, and PTY.open for Ruby >=1.9.

**N.B.:** I did not fix the indentation of the ACOC module in lib/acoc.rb after the first commit to avoid spurious conflict due to white space changes (plus it makes the diff simpler).