The new std.process is ready for review
Lars T. Kyllingstad
public at kyllingen.net
Thu Mar 14 14:58:19 PDT 2013
On Thursday, 14 March 2013 at 21:51:37 UTC, Lars T. Kyllingstad
wrote:
> On Thursday, 14 March 2013 at 20:34:11 UTC, Steven
> Schveighoffer wrote:
>> Part of me thinks you shouldn't have to specify environment in
>> order to specify redirects, but I don't know how that works
>> with the overloads. I know File is a struct, so it shouldn't
>> bind to null, right?
>
> No, there won't be any problem with adding overloads with and
> without environment, but then there'll be six spawnProcess()
> versions. We have to weigh that against the user having to
> explicitly specify a null when they don't want to add to the
> environment, but still want redirects. [...]
We could switch them around, though, and put the environment
after the redirects:
spawnProcess(args, stdin, stdout, stderr, env, config)
spawnProcess(args, env, config)
spawnProcess(prog, stdin, stdout, stderr, env, config)
spawnProcess(prog, env, config)
I didn't specify any default values there, but every parameter
would have a default except the first one.
Lars
More information about the Digitalmars-d
mailing list