digitalmars.D.learn - std.process not working in Windows
- Jesse Phillips (4/4) Jan 15 2010 I've been using the system() function from std.process for some time in ...
- Jesse Phillips (7/7) Jan 15 2010 I also tried an call to execv, and just now checked the return status wh...
- Jesse Phillips (1/1) Jan 15 2010 Scratch that, my company seems to have updated the Anti-virus and that w...
I've been using the system() function from std.process for some time in Windows and recently it has stopped working. But it doesn't seem to be a problem with my source code, dmd, or Windows. First I thought it might have been changes I made, so I used an old copy of the source. Then I thought it might be a regression in dmd so I grabbed 2.035 and 2.030. Then I thought Windows just didn't like system calls any more, so I found an executable compiled in the past, but it actually worked. I looked at the return value of system(null) which indicated it found the shell. And the return value of my call was 0 indicating that it ran successfully. This makes it very hard to inform the user that nothing actually happened. Can anyone verify similar behavior, or suggest another avenue that doesn't involve reinstalling Windows :)
Jan 15 2010
I also tried an call to execv, and just now checked the return status which was -1. So I guess that could be used to say, "Sorry this program doesn't work," but I'd like to be able to actually make these calls. I should try std.c.system shouldn't I? import std.process; import std.stdio; void main() { auto args = ["hello world"]; writeln(execv("echo", args)); }
Jan 15 2010
Scratch that, my company seems to have updated the Anti-virus and that was bringing my headaches.
Jan 15 2010