in reply to open3, process sychronization problem

I don't know the details of communication with Tripwire, but have a general comment.

The problem you are having may be due to the fact that you are not waiting for Tripwire to come back with a command prompt before printing another date. Input gets all bunched up.

I suggest that you use an approach like

1. open the connection 2. print the date 3. read in response until a prompt for a new date 4. goto 2 until done
Most bidirectional communication is like this, an alternating write and read.

-Mark

Replies are listed 'Best First'.
Re: Re: open3, process sychronization problem
by Anonymous Monk on Feb 02, 2004 at 13:02 UTC
    thanks mark, another problem is that, I read from process and write to it only after polling its o/p, but sometime the process doesnt flush its o/p in my $read variable ( if its not stdout) , causing my program to loop infinitly, is there any library like comm.pl or ptty in window which could solve my problem?