Why are the exec* functions deprecated in std.process?
Lars T. Kyllingstad
public at kyllingen.net
Tue Oct 29 15:20:46 PDT 2013
On Tuesday, 29 October 2013 at 20:55:22 UTC, Andrei Alexandrescu
wrote:
> Replacing
>
> return wait(spawnShell(cmd)) != 0;
>
> with
>
> spawnShell(cmd);
> return 0;
>
> as the last line of main() produces weird errors, including
> intermittent segfaults. Thoughts?
That's really weird. I've tried and failed to reproduce it with
this minimal test program on my Linux box:
int main(string[] args)
{
import std.process;
spawnShell(args[1]);
return 0;
}
This worked fine with a variety of app names passed in args[1].
Are you able to provide a bit more context? Such as:
- Which platform are you on?
- What happens before spawnShell()?
- Which program is spawned?
Lars
More information about the Digitalmars-d
mailing list