Except, of course, this is Unix, and we have i-nodes, and the system knows how to hold onto a file until all links are gone, as I recall.
Ergo, just delete it once you know the viewer has it open, IIRC.

There is only one way to be sure it is _your_ child process that has opened it. I'm pretty sure it involves looking at the table of open files. However, ...

Which is fine, but if you use 'open' to fork off and run Acrobat in parallel with your program, then at the moment system() returns you do *not* know that it has safely grabbed hold of the file. You don't even know that it has when you see Acrobat appear in the process > table.

since you do need to take the steps to be sure it is your child process that has it open, once you have taken those steps, there is no need to wait around for it to close. IIRC.

Reply via email to