IO.popen(ARRAY)

X

Xavier Noria

I need to execute external programs and capture their stdout using
parameters from a web form. This is a web application that should be
portable to Mac OS X, Linux, *BSD, and Windows.

My understanding is that the natural way to implement this is to use
IO.popen(ARRAY), which the 2nd edition of the Pickaxe says it's going
into 1.9. Nevertheless it also says fork(2) is needed, and seems like
this is going to be the case in 1.9 as well, but this is not
mentioned explicitly. Will IO.popen(ARRAY) work on Windows in 1.9? If
not, which alternative would you consider?

-- fxn
 
R

Robert Klemme

Xavier Noria said:
I need to execute external programs and capture their stdout using
parameters from a web form. This is a web application that should be
portable to Mac OS X, Linux, *BSD, and Windows.

My understanding is that the natural way to implement this is to use
IO.popen(ARRAY), which the 2nd edition of the Pickaxe says it's going
into 1.9. Nevertheless it also says fork(2) is needed, and seems like
this is going to be the case in 1.9 as well, but this is not
mentioned explicitly. Will IO.popen(ARRAY) work on Windows in 1.9? If
not, which alternative would you consider?

-- fxn

If you're using Ruby on cygwin I'm pretty sure that it'll work because
cygwin supports fork.

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top