From: Robert Klemme Date: 2003-05-20T01:06:10+09:00 Subject: Re: select strange behavier "Simon Strandgaard" <0bz63fz3m1qt3001@sneakemail.com> schrieb im Newsbeitrag news:pan.2003.05.19.09.29.28.72175@sneakemail.com... > On Mon, 19 May 2003 10:35:56 +0200, Robert Klemme wrote: > > > > did you check that this works on windows, too? > > I recently ran into a problem with pipes on windows. > > Apparently they can't be used for multiplexing... > > No, the code is untested on windows. I only have a FreeBSD box. > I am interested getting this code working on windows too. > feedback about windows would be nice. > > Download these 2 files. > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/metaeditor/experiments/cpp_embed_ruby/test/output/testall.rb > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/metaeditor/experiments/cpp_embed_ruby/test/output/b.rb > > If it works the output should be similar to this. Unfortunately not: it hangs in the first test "test_fork". > > ruby testall.rb > > TestSandbox#test_fork pid=774 > parent.leave > done > . > TestSandbox#test_system . > TestSandbox#test_system_args . > TestSandbox#test_system_status1 . > TestSandbox#test_system_status2 . > TestSandbox#test_system_status3 . > Time: 1.188965 > OK (6/6 tests 17 asserts) A question along the way: Why did you introduce a singleton class for redirection? Why don't you create an instance of a SandBox which receives the redirecting streams and uses them when system is invoked? To me it seems that a singleton is not in order because one might want to do different redirections. Regards robert