dual pipes?

T

Trans

Is there a way to fork a seperate ruby process (i.e. a clean
environment) and get output back on two differnent "channels"?

I'm trying to create a test runner that runs suites in seperate forks
to prevent possible clashing between required libs. I've hacked a
version with popen where the test results are marshalled across the
pipe, but if the code I'm testing prints anything to stdout then the
marshal dump is spoiled. I suppose I could put some sort of markup
around the marshal dump to isolate it, but it still seems very hackish.
A a secondar pipe would be better, or perhaps I can redirect the tests
code output elsewehere?

I'm not very familiar with these techniques, so help here is extra
appreciated.

Thanks,
T.
 
A

Ara.T.Howard

Is there a way to fork a seperate ruby process (i.e. a clean environment)
and get output back on two differnent "channels"?

might want to check out my slave lib... it sets up a drb object in a child
process in a few lines of code. you could use it to run your tests and get
objects back in the normal drb way.

cheers.



-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 
T

Trans

That's an interesting solution. I noticed mention of unix socets in the
source code. Is drb cross-platform?

T.
 
A

Ara.T.Howard

That's an interesting solution. I noticed mention of unix socets in the
source code. Is drb cross-platform?

probably not that way... if you look at the source i imagine you could tweak
to use loopback or something... i didn't think of that at the time...

cheers.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top