std.process.system asynchronous? or win cmd line oddity?

Jonathan M Davis jmdavisprog at gmail.com
Fri Aug 20 02:19:34 PDT 2010


On Thursday 19 August 2010 21:07:30 Nick Sabalausky wrote:
> Is std.process.system asynchronous? Is it supposed to be? Is execv known to
> trick the windows command-line into giving control back to the user?
> 
> I've been playing around a bit (on windows) with rdmd, which uses system()
> heavily (and also execv for running a newly-compiled program), and I
> frequently get text appearing (such as a compiler error message or results
> from a program being rdmd'd and run) *after* I get keyboard control back
> with a new prompt. Which is weird.
> 
> It's going to take a little more work to whittle it down to a good test
> case, but I thought I'd ask if anyone knew something already.

I believe that I got some odd behavior when I used wget; IIRC, it was returning 
before wget actually did anything. I ended up having to use curl. I still don't 
know how that happened, since even if wget started a new thread, I wouldn't have 
expected it to terminate and return from system. Maybe it starts a new process. 
I don't know. But I have seen weird behavior from system before. I don't know 
how much of it has to do with system and how much of it has to do with the 
programs themselves though.

- Jonathan M Davis


More information about the Digitalmars-d mailing list