On 24 Jun 98, at 22:34, Balan Sinniah wrote:

> 
> Currently I am doing ATM Network Simulation for my final project. The ATM
> Network Simulator is running in Linux using X-Windows but at the same time
> it can be run without using X-Windows in background mode. Every time the
> simulator finished running, it produces an output file in the same
> directory and it is in this form "SIM_SNAP.XXX". The "XXX" is a number (3
> digit). I think the number is the process id. If it is the process id then
> how can I read this file without knowing the process. I am running the
> simulator from another C program that is I am calling the.exe file using
> exec() function. How can I read the output file which the name is not
> specified??? Can anyone guide me???
> 
> Thanks...


Hi,

There is little information to go on, so I will give some broad 
suggestions.

Is there only 1 SIM_SNAP.* in the directory at a time or can there be 
multiple? If there is only 1, OR if you would like to get the names of all 
the SIM_SNAP.XXX names, then you can use opendir/readdir to read the file 
names in the directory.


If this is not an option, then how about having the terminating process 
spwan the report program?

Hope this helps

John Gorman

              ///
             (. .)
    /=====oOO-(_)-OOo===========================\
   /                                             \
  /                  John Gorman                  \
  |         E-mail:  [EMAIL PROTECTED]        |
  |                                               |
  \        "We are what we repeatedly do."        /
   \                   Aristotle                 / 
    \===========================================/

Reply via email to