P
papahuhn
Hello,
I want to create a wrapper for an application that is normally run by
xinetd.
The information flow should be as following: xinetd <-> wrapper <-> app.
So I have to execute the app within the wrapper and communicate with it
using a bidirectional pipe. Unfortunately there is a problem with the
input-buffering of the open2() handles as mentioned by perldoc perlipc:
My first attempts to use Expect did not solve the problem.
Has anyone concrete experience with this matter?
Thanks
I want to create a wrapper for an application that is normally run by
xinetd.
The information flow should be as following: xinetd <-> wrapper <-> app.
So I have to execute the app within the wrapper and communicate with it
using a bidirectional pipe. Unfortunately there is a problem with the
input-buffering of the open2() handles as mentioned by perldoc perlipc:
The problem with this is that Unix buffering is really going to ruin
your day. Even though your "Writer" file handle is auto-flushed, and
the process on the other end will get your data in a timely manner,
you can't usually do anything to force it to give it back to you in a
similarly quick fashion. In this case, we could, because we gave
cat a -u flag to make it unbuffered. But very few Unix commands are
designed to operate over pipes, so this seldom works unless you
yourself wrote the program on the other end of the double-ended pipe.
My first attempts to use Expect did not solve the problem.
Has anyone concrete experience with this matter?
Thanks