Hello all together!
My situation: I have written a program in C under Linux which should control another
commercial application.
In detail: My program starts a finite-element-solver (MARC) with system(...). It
should wait until MARC has written its solution file, read this file, work with the
data, etc.
The problem: MARC takes itself to the background, system (...) returns and my programm
wants to continue with working. Error, no file available naturally (MARC needs in this
case 30 secs.).
What I know: 1. System is a procedure with fork(...), wait (...) and so to create a
sub process and there are certain parameters to modify sub processing.
2. I could do a workaround with reading the status of the solution file, but because
of the critical time conditions of the approximation algorithm in my program I don't
want this.
What I want to know: Are there parameters of wait, waitpid, etc. to force my program
waiting for the solution file (MARC's finishing)? Are there other possibilities on
system level available to implement in C?
Thanks for your cooperation.
Bernd Antweiler
[EMAIL PROTECTED]