os.exec and waiting for process
Dear Taco, dear all,
Reinhard Kotucha wrote a support script in texlua but there is a strange
thing:
os.exec(...)
does not wait for the process to terminate.
Now my question is: Is there any way to do that, i.e., to call a
different program and wait for it to terminate, resembling the perl
'system' call.
Thanks a lot and all the best
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining
On Fri, Jan 18, 2008 at 08:15:26AM +0100, Norbert Preining wrote:
os.exec(...) does not wait for the process to terminate.
Now my question is: Is there any way to do that, i.e., to call a different program and wait for it to terminate, resembling the perl 'system' call.
From refmanual of 5.0:
| os.execute (command)
|
| This function is equivalent to the C function system. It passes command to
| be executed by an operating system shell. It returns a status code, which
| is system-dependent.
Yours sincerely
Heiko
Norbert Preining wrote:
Dear Taco, dear all,
Reinhard Kotucha wrote a support script in texlua but there is a strange thing: os.exec(...) does not wait for the process to terminate.
Now my question is: Is there any way to do that, i.e., to call a different program and wait for it to terminate, resembling the perl 'system' call.
For that, you should use os.execute() from the core lua. The function os.exec() *replaces* the current process with the to-be-executed process, and never returns. Best wishes, Taco
On Fr, 18 Jan 2008, Taco Hoekwater wrote:
For that, you should use os.execute() from the core lua. The function os.exec() *replaces* the current process with the to-be-executed process, and never returns.
Arg, thanks. I was a bit misguided and thought that os.exec from texlua
was the same. Thanks for clarifying that.
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining
participants (3)
-
Heiko Oberdiek
-
Norbert Preining
-
Taco Hoekwater