Thread overview | |||||
---|---|---|---|---|---|
|
January 15, 2010 std.process not working in Windows | ||||
---|---|---|---|---|
| ||||
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 :) |
January 15, 2010 Re: std.process not working in Windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | 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)); } |
January 15, 2010 Re: std.process not working in Windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | Scratch that, my company seems to have updated the Anti-virus and that was bringing my headaches. |
Copyright © 1999-2021 by the D Language Foundation