It doesn't work. exitStatus comes out as nil. I probably understand why.
Naturally, one can always bite the bullet and write the whole story
(open a Process, attach two reader threads, direct all output streams
into Ruby strings, wait till the Process quits, etc). This would be a
lot of code for a common scripting task, and from past experiences doing
same thing with C and Java, there are a few interesting surprises.
Can some enlightened soul please show me The Ruby Way to do it all in
one line? Reference to an appropriate page in the Pickaxe that I should
have RTFM'd not to ask this silly question would be even better
It doesn't work. exitStatus comes out as nil. I probably understand why.
Naturally, one can always bite the bullet and write the whole story
(open a Process, attach two reader threads, direct all output streams
into Ruby strings, wait till the Process quits, etc). This would be a
lot of code for a common scripting task, and from past experiences doing
same thing with C and Java, there are a few interesting surprises.
Can some enlightened soul please show me The Ruby Way to do it all in
one line? Reference to an appropriate page in the Pickaxe that I should
have RTFM'd not to ask this silly question would be even better
you can do almost all of this using open3, but not exitstatus. it also
requires you to spawn a new process for every command if you want to
distinguish output.
regards.
-a
--
EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it;
and a weed grows, even though we do not love it. --Dogen
definitely *nix only - as it uses Open3 which, itself, relies on fork. i
probably could make it work on windows since i think there is a windows for
available now correct?
i don't know if what you want to do is possible on windows - any windows
experts out there?
Will you expect this module to work on Win32 platforms, or is it Unix
only?
Alex
--
EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it;
and a weed grows, even though we do not love it. --Dogen
i don't know if what you want to do is possible on windows - any windows
experts out there?
As far as I remember, NT and 2000 support POSIX calls, but XP doesn't
(although there is a library that you can download, or you can have
Cygwin, etc - not viable options for what I need to do). Looks like I'll
have to use the file system, OS-360 style.
google for 'create process' and window - i do think there is someway to do
this, i just don't know it...
cheers.
-a
···
On Fri, 23 Jul 2004, Alexey Verkhovsky wrote:
i don't know if what you want to do is possible on windows - any windows
experts out there?
As far as I remember, NT and 2000 support POSIX calls, but XP doesn't
(although there is a library that you can download, or you can have
Cygwin, etc - not viable options for what I need to do). Looks like I'll
have to use the file system, OS-360 style.
Best regards,
Alex
--
EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it;
and a weed grows, even though we do not love it. --Dogen