Statalist The Stata Listserver

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

st: problem with sleep / winexec / shell

From   "Alex Ogan" <>
To   <>
Subject   st: problem with sleep / winexec / shell
Date   Thu, 25 May 2006 15:14:35 -0400


I am using Stata 8.2 under Windows XP.  I want to have a .dofile call an
external program, wait for it to finish, and continue.  The problem is
this: if I call the external program using -winexec-, it takes about 15
seconds to run.  If I call it using -shell-, it takes at least several
minutes.  If I call it using -winexec-, and follow it in the dofile with
code like this:

capture confirm file `l_DummyOutputFileFullName'
while _rc != 0 {      
	sleep 10000   
	capture confirm file `l_DummyOutputFileFullName'

It again takes at least several minutes.

In the case of the -shell- call and the -while-, -sleep- construct,
wsestata.exe is still taking 90+% of CPU (according to Windows task

Can anybody suggest a solution?


This message is intended solely for the designated recipient(s). It may contain confidential or proprietary information and may be subject to confidentiality protections. If you are not a designated recipient, you may not review, copy, or distribute this message. If you receive this in error, please notify the sender by reply e-mail and delete this message. 

Arrowstreet Capital, L.P. is an Equal Opportunity Employer. 

*   For searches and help try:

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