I tried some experiments on Windows today, on the sort of issue
raised by Ignacio. All results were negative (i.e. nothing
I tried worked). I'll have another go tomorrow.
I don't mean to be defensive, but I thought I might briefly
describe what I'm doing here. Usually working on gretl is a
pleasure for me, but when I'm working on issues that are specific
to Windows, and I have to boot Windows to test, I really wish
someone were paying me the big bucks to do it.
Until Ignacio (quite rightly) raised the point about gretl on
Windows not waiting for tramo (started using "!") to finish before
moving on, gretl had been using the relatively simple Windows
function call WinExec() to handle shell commands. Like most
simple Windows functions this is now deprecated by Microsoft.
What you're "supposed to use" -- and what you have to use to make
the caller wait for the command to complete -- is the function
CreateProcess(). This is a typically monstrous Microsoft API: a
function with 10 arguments, two of which are pointers to
structures which between them contain 22 elements.
CreateProcess() is documented in opaque, bureaucratic fashion on
msdn.com. In attempting to understand how to actually use it, one
googles for examples and discussion. This "helpfully" turns up
various cases of Microsoft experts offering authoritative but
mutually contradictory views on the "right" way to use the API --
something that one finds with most such MS APIs.
So that's why it's taking a while to get this right! But I really
don't want to see gretl messing with ad hoc time-waster loops to
work around lack of synchronization, if I can help it.
Allin.