Skip to content

Instantly share code, notes, and snippets.

@indirect

indirect/child.rb

Created Jun 14, 2013
Embed
What would you like to do?
ruby child process with non-buffered output
# give the child process a terminal so output isn't buffered
@master, slave = PTY.open
in_clean_environment do
@pid = ::Process.spawn(
config.env,
%Q(bash -c "#{config.command}"),
:in => slave,
:out => slave,
:err => slave,
:chdir => config.dir,
:pgroup => true
)
end
@indirect

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.