Re: spawning Fortran executables [message #74010] |
Fri, 17 December 2010 10:40 |
Matt[2]
Messages: 69 Registered: March 2007
|
Member |
|
|
On Dec 17, 11:30 am, Derek Philip Brown <derekphilbr...@gmail.com>
wrote:
> In general, I find idl (or spawn) waits for
> the UNIX command to complete before continuing to the next batch file
> program called.
>
> Ok fine. The question is this. If I use spawn, 'model1' where
> model1 is an executable that runs a Fortran program, will IDL know to
> wait for that to finish before continuing to the next batch file
> command.
> Does anyone know if IDL will automatically wait for the Fortran model
> to run?
From the IDL 6.4 help system:
"By default, IDL waits for the child process started by SPAWN to
finish before it continues. It is possible to have IDL instead
continue execution in parallel with the child process. The syntax for
this depends on the operating system on your system:
Under UNIX, include an ampersand (&) at the end of your shell command.
Under Windows, specify the NOWAIT keyword to SPAWN."
So by default IDL waits for the child process, and you have to do
something extra to get it to continue. If your command to spawn
doesn't background the process (have an ampersand at the end), also if
that command doesn't in turn spawn further processes in the
background, you should be good to go.
HTH.
Matt
|
|
|
Re: spawning Fortran executables [message #74011 is a reply to message #74010] |
Fri, 17 December 2010 10:39  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Dec 17, 4:30 pm, Derek Philip Brown <derekphilbr...@gmail.com>
wrote:
> Does anyone know if IDL will automatically wait for the Fortran model
> to run?
It will wait until the program you called finishes. That is not
necessarily the same as your model being done, if the program you call
launches other processes and does not wait for them.
|
|
|