Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: How I'm sure syswrite has finished?

by ChemBoy (Priest)
on Mar 14, 2009 at 17:26 UTC ( [id://750633] : note . print w/replies, xml ) Need Help??

in reply to How I'm sure syswrite has finished?

If it were on a local machine I'd suggest waiting for the other process, but that's not really an option in this case (unless you can wait for the local process? I don't know how P::FM works in any detail, nor how you're set up, so this might be totally useless). Looking at the problem as a whole, rather than the specific solution you've already tried, you might want to change your remote process to send an acknowledgement of some kind back at you when it's done—it requires a little more coding and a little more network traffic, but it seems likely to me that it would work, which appears to be an advantage over the current approach.

If God had meant us to fly, he would *never* have given us the railroads.
    --Michael Flanders

Replies are listed 'Best First'.
Re^2: How I'm sure syswrite has finished?
by casiano (Pilgrim) on Mar 14, 2009 at 21:40 UTC
    Many thanks. Apologies for the late answer but I have been away of work a few hours.

    I tried already your suggestion of trying to produce an acknowledge from the other side (the other side is a process running in a remote machine via SSH. It was started using IPC::Open2) didn't work well. May be I did s.t. wrong. As several people mentioned is difficult to give advice without the whole context, but I can post the two programs (local and remote) if you like.

    Many thanks