From: John Wheeler Date: 2002-01-05T13:23:44+09:00 Subject: [ruby-talk:30267] Need help understanding system() call This is a multi-part message in MIME format. ------=_NextPart_000_0021_01C1956E.2A72EAC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a quick question for anyone willing to help out a newbie:=20 Does the Windows ruby installation package "ruby165-0.exe" from=20 rubycentral.com expect the user to be also running the cygwin environment to be able to do a system() call? I just installed the ruby165-0.exe package on a machine that has Windows98 and the DJGPP environment installed. I have found that some scripts that use the system() call do not seem to function correctly. I stumbled on this trying to run the file makehtml.rb in the /ruby/doc/ruby/rubyunit-0.4.1 directory in the distribution. The makehtml.rb would run without producing .html files. =20 Troubleshooting, I find that executing: C:\>ruby -e 'system("echo *")' , as in Programming Ruby book, produces the correct result, but, executing: C:\>ruby -e 'system("rd2 -o./assert ./assert.rb");puts $?' =20 produces a return code, $? =3D=3D 32512 . On the other hand, manually running rd2 at the command prompt works find. I have found no reference for the error code, and have been able to read only enough of process.c in the ruby source code to know that the system call depends heavily on the operating environment. Will some one please point out what is happening? Thank you, John Wheeler ------=_NextPart_000_0021_01C1956E.2A72EAC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I have a quick question for anyone = willing to help=20 out a newbie:
 
Does the Windows ruby installation = package=20 "ruby165-0.exe" from
rubycentral.com expect the user to be = also running=20 the cygwin
environment to be able to do a system() call?
 
I just installed the ruby165-0.exe = package on a=20 machine that has
Windows98 and the DJGPP environment installed.  = I have=20 found that some
scripts that use the system() call do not seem to = function=20 correctly.
 
I stumbled on this trying to run the = file=20 makehtml.rb in the
/ruby/doc/ruby/rubyunit-0.4.1 directory in the=20 distribution.  The
makehtml.rb would run without producing .html = files. 
 
Troubleshooting, I find that executing: = C:\>ruby=20 -e 'system("echo *")' ,
as in Programming Ruby book, produces the = correct=20 result, but,
executing: = C:\>ruby -e=20 'system("rd2 -o./assert ./assert.rb");puts $?' 
produces a = return code,=20 $? =3D=3D 32512 . On the other hand, manually
running rd2 at the = command prompt=20 works find.
 
I have found no reference for the error = code, and=20 have been able to
read only enough of process.c in the ruby source = code to=20 know that the
system call depends heavily on the operating=20 environment.
 
Will some one please point out = what is=20 happening?
 
Thank you,

John = Wheeler
------=_NextPart_000_0021_01C1956E.2A72EAC0--