[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Advanced use of the shell command

From   "Martin Weiss" <>
To   <>
Subject   RE: st: Advanced use of the shell command
Date   Thu, 26 Jun 2008 17:59:22 +0200

I do not want to hijack this interesting thread but is there a way to tell
-shellout- not to open a new instance of the program it calls? -shellout
using foo.tex- brings up a new instance of my editor which clutters my
session with a lot o f redundant programs...

Martin Weiss

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen

Fon: 0049-7071-2978184




-----Original Message-----
[] On Behalf Of Sergiy Radyakin
Sent: Thursday, June 26, 2008 5:24 PM
Subject: Re: st: Advanced use of the shell command

Hello Roy,

thank you for your interest. However, shellout uses winexec, and hence
does not wait for the program that has been launched to complete. The
OS (command processor) does wait, but this happens in parallel to the
Stata process, which continues executing the do file. An old trick to
organize a wait is to wait for a marker file to be created, but this
may never happen if the process being launched crashes. (I may not
know in advance, how much time it will need for FooBar.exe to
complete, hence timeouts are not applicable).

I also don't see how the "<" can make a difference. Try:
dir /s
dir /s < nul

Using "<" with a parameters file does not replace the parameters
already present in the command line. hence the last two commands will
produce the same output, even though it is (generally) different from
the output of the first command. So I can't remove /C which is added
by Stata in the command line, unless I can change the code of
FooBar.exe to skip the first parameter.

But, just out of curiosity, what is a "Windows clone running on Linux"?

Thank you,
   Sergiy Radyakin

On 6/26/08, Roy Wada <> wrote:
> >I have three questions regarding the use of the shell command in Stata
> >for Windows. This is rather technical, and might be interested to just
> >a few readers, but I would really want to know the answers.
> -shellout- might take you halfway there. The codes are posted here:
> Note that "<" is a way to upload predefined parameters from a text file.
> Someone told me it doesn't work on a Windows clone running on Linux.
> It works fine on my Windows XP machine.
> The latest version on SSC (bundled under -outreg2-) comes with a
> help file.
> Roy
> _________________________________________________________________
> Need to know now? Get instant answers with Windows Live Messenger.
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index