Hi,<br><br>sorry if it's a know fact - I could not find the info easily. I hope this will be useful.<br><br>On Windows, system() seems to work partially, is it normal ? The following works:<br><br><font class="Apple-style-span" face="'courier new', monospace">>>> system("echo hello")<br>
hello<br>=> true<br></font><br>the following doesn't seem to (although svn is in the path):<br><br><font class="Apple-style-span" face="'courier new', monospace">>>> system("svn")<br>=> false<br>
>>> system("svn.exe")<br>=> false<br></font><br>Still on Windows, it seems that IO.popen crashes (I had a quick look at IoOps.cs to see if it was implemented):<br><br><font class="Apple-style-span" face="'courier new', monospace">>>> IO.popen("svn.exe") do |io| puts io.read end<br>
:0:in `popen': La référence d'objet n'est pas définie à une instance d'un objet. (System::NullReferenceException)<br> from :0:in `popen'<br> from :0<br></font> <br>
I ran the same stuff on Mono and got:<br><br><font class="Apple-style-span" face="'courier new', monospace">IronRuby 1.0.0.0 on Mono 2.4<br>Copyright (c) Microsoft Corporation. All rights reserved.<br><br>>>> system("blah")<br>
IronRuby.Libraries:0:in `ExecuteProcessAndWait': No such file or directory (Errno::ENOENT)<br>        from IronRuby.Libraries:0:in `ExecuteCommandInShell'<br>        from :0:in `system'<br><br>>>> system("svn")<br>
=> nil<br>>>> system("svn > svninfo.txt")<br>=> nil<br>>>> exit<br></font><br>Finally, running IO.popen on Mono gives the same output as Windows:<div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">IronRuby 1.0.0.0 on Mono 2.4</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">Copyright (c) Microsoft Corporation. All rights reserved.</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></div><div><font class="Apple-style-span" face="'courier new', monospace">>>> IO.popen("svn.exe") { |io| puts io.read }</font></div><div><font class="Apple-style-span" face="'courier new', monospace">:0:in `popen': Object reference not set to an instance of an object (System::NullReferenceException)</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="'courier new', monospace">        </font></span><font class="Apple-style-span" face="'courier new', monospace">from :0:in `popen'</font></div>
<div><br></div><div><br></div><div>So my question is: what's the current status on system and IO.popen ? Is it supposed to work and is it a regression, or is it not fully implemented ?</div><div><br></div><div>I may be able to help at some point here (either by providing patches or testing on Mono + Windows) if it's not your top priority :)</div>
<div><br></div><div>Given that I use Ruby to glue things together quite a lot, that would be useful to me.</div><div><br></div><div>cheers,</div><div><br></div><div>-- Thibaut</div><div></div></div>