Why are the exec* functions deprecated in std.process?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Oct 28 20:45:31 PDT 2013
I am using the new std.process and am disappointed with it.
There is no convenient function to replace the running process with a
new one. There used to be the exec() family of functions, which
conveniently use string[] for arguments etc., but now the doc says:
============
These functions are scheduled for deprecation. Please use spawnShell
instead (or, alternatively, the homonymous C functions declared in
std.c.process.)
============
The problems are:
1. spawnShell does NOT do the same thing as exec*. The former waits for
the spawned process and then continues the calling process. The latter
_replaces_ the running process with the new process.
2. The homonym (not homonymous btw) functions in std.c.process use in
char*, not string, which makes them unpleasant to use.
So... what to do here?
Andrei
More information about the Digitalmars-d
mailing list