Forum: Ruby Ceding commandline control to child process

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Juan Z. (Guest)
on 2009-03-17 00:16
(Received via mailing list)
Say I want to launch a child process and allow the user to interact
with it until it returns.  Is there an easy way to do this?   It
seems to work just using the back ticks except that the child
process' output is never displayed.

Juan
Sean O. (Guest)
on 2009-03-17 00:53
(Received via mailing list)
On Mon, Mar 16, 2009 at 10:12 PM, Juan Z. <removed_email_address@domain.invalid>
wrote:
> Say I want to launch a child process and allow the user to interact with it
> until it returns.  Is there an easy way to do this?   It seems to work just
> using the back ticks except that the child process' output is never
> displayed.
>
> Juan

Try system("command") instead of `command` (I'm presuming you don't
need to capture stdout or stderr).
Juan Z. (Guest)
on 2009-03-17 01:21
(Received via mailing list)
On 16 mars 09, at 18:50, Sean O'Halpin wrote:

>
> Try system("command") instead of `command` (I'm presuming you don't
> need to capture stdout or stderr).
>

Thanks,  that works perfectly.
Juan
This topic is locked and can not be replied to.