std.process - POSIX specific callback
Lars T. Kyllingstad
public at kyllingen.net
Tue Jun 11 09:31:19 PDT 2013
On Monday, 10 June 2013 at 16:20:53 UTC, Steven Schveighoffer
wrote:
> What I am thinking of is possibly to expose the OS-specific
> spawnProcess implementation as an object with the API defined
> by it, similar to how writeln simply forwards to
> stdout.writeln. We could have spawnProcess simply forward to
> posixProcessImpl.spawnProcess (or
> windowsProcessImpl.spawnProcess on windows)
>
> Then if someone wants to actually take advantage of OS-specific
> features, they can call on the appropriate object. It
> shouldn't compile where it's not implemented (e.g. windows
> spawnProcess shouldn't be callable on Linux).
Why should we add an object? Why not expose the OS-specific
spawnProcess() implementation as it is -- a free function -- with
an additional parameter which specifies a callback delegate?
Can you think of any other places we'd want to hook besides
post-fork-pre-exec?
More information about the Digitalmars-d
mailing list