Hello. I've got an easy question, I hope, for you advanced unix hackers:
I've got a program that writes a file (an input to a raytracer) that eventually
calls the raytracer itself (via "system" or "exec"), which should read that
file. Unfortunately, when the raytracer tries to "fopen" that file, it pukes.
I am assuming this has something to do with output file buffering or some such
subtlety.
My question is simple: how do I close or flush or whatever the file I'm
creating such that it can be "fopen"ed from a called program/process? My
understanding is that an fclose(...) statement flushes the buffer, and I can
read the file from another window just fine, it's all there. The problem only
occurs when the file is "fopen"ed from a process called by the program creating
the file.
Help! I'm on an Iris Indigo running IRIX 5.2, if that makes a difference.
I don't know if this is a platform-specific problem...
Thanks for your help!
- Paul Thiessen