[comp.unix.questions] Intertask Communication

dalton@mit-caf.MIT.EDU (Timothy J. Dalton) (06/16/90)

I am trying to get a fortran program to execute another program
and wait for the completion of the second program before resuming 
execution of the first.

On a MIPS M120/5 (SYSV) system, I have been able to submit the
second job and have it execute using the code :

      open(unit=idsk3,file=execfl,status='old',access='append',
     1     disp='submit')
      close(unit=idsk3) 

This seems to work just fine.
However,  I have been unable to halt the calling program until
the submitted job finishes.   I have tried

      status = 0
      retval = wait(status)

This fails to halt the calling program.

If anyone knows of a good way to do this in fortran (without
using file I/O and flags) I would appreciate it.
Please reply by e-mail as I don't read this newsgroup regularly. 

Tim

+============================================================================+
|                              Timothy J. Dalton                             |
+============================================================================+
| Materials Etching Technologies Laboratory        dalton@caf.mit.edu        |
| Department of Chemical Engineering               tjdalton@athena.mit.edu   | 
| Massachusetts Institute of Technology                                      |
+============================================================================+
|       All Good Things in All Good Time....Run, Run, Run for the Roses      |
+============================================================================+