On Wed, 24 Jun 1998, Balan Sinniah wrote:
->
->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
3 digits are not enough for a 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???
To get the simulator's PID :
Add a call to getpid() before u call the exec().
It will return u your process' PID which is unchanged during the exec()
call.
Marin
-= Why do we need gates in a world without fences? =-