Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor process launching #202

Closed
wants to merge 1 commit into from
Closed

Refactor process launching #202

wants to merge 1 commit into from

Conversation

sos4nt
Copy link
Contributor

@sos4nt sos4nt commented May 18, 2012

I've refactored process launching to always use spawn, i.e. Process.spawn for Ruby 1.9 and POSIX::Spawn.spawn for Ruby 1.8 and JRuby.

Furthermore I've re-added support for PTY to address the missing output issue. Ruby doesn't buffer stdout when a tty is present. stdin on the other hand is closed to keep processes from expecting user input.

I've also removed foreman-runner since the tests are passing without it.

Let me know what you think.

@travisbot
Copy link

This pull request passes (merged 73fcf19 into 4a13122).

@dennisreimann
Copy link

+1 :)

@tysonmote
Copy link

+1

@ddollar
Copy link
Owner

ddollar commented Jun 8, 2012

Simulating a tty is convenient to work around things like stdout but it is still undesired because it makes your code in development run in a different mode than your code in production. You will need to have $stdout.sync = true in your app to run it under upstart or on Heroku also, so I'd rather not hide that fact from you in development.

Furthermore, PTY.spawn has a bug with Ruby 1.9.2 and some version of OSX (I think it was 10.6) that causes kernel panics when an unknown command is run.

@ddollar ddollar closed this Jun 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants