Launching eb-lite from perl with open2
Esteban Fernandez Stafford <[email protected]> Fri, 5 Mar 2004 15:13:49 +0100 (CET)
| Newsgroups | gmane.network.everybuddy.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have been trying to start instances of eb-lite from perl in various
ways. And, at the moment, I am most happy with the open2 method that
starts a process and gives me a read handle to the process output and
a write handle to its input. The only problem with eb-lite is that the
--pipes N M option does not let me set N=0. I changed the main.c file
as follows. This should allow connecting a read pipe to stdin(0) or
connecting a write pipe to stdout(1) or stdout(2)
161c161
< if(p1==0 || p2==0)
---
> if(p2==0 || p1==1 || p1==2)
So far this works nicely, but I don't know if there will be
interference from some printf to stdout, or something... Does anyone
feel this could fail? Is there a better/easyer way of using sdtin
and stdout to talk to eb-lite?
Thanks and keep up the nice work, EB-Lite is a realy nice piece of
software!
S t e p h e n!
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
:wq