in reply to Waiting for delayed output after system()

You could check file size as well as existence with -e && -s. That may still not be enough if the file is larger than its write buffer. Do you know what size the output file will be? -s returns the size.

I'm pretty sure lsof won't help over NFS.

After Compline,
Zaxo

  • Comment on Re: Waiting for delayed output after system()

Replies are listed 'Best First'.
Re: Re: Waiting for delayed output after system()
by to.b (Initiate) on May 06, 2004 at 14:55 UTC

    First of all thanks for your fast reply.

    Unfortunately the programs output I'm interested in is only available as a file. And this file doesn't have a fixed size.

    lsof and subsequent grep would help over NFS, but I wanted to code portable. So I decided not to use this possibility.

    I think your idea to check the file size regularly is very good although not 100% sure. I will try this.

    Thanks again!

     to.b