[phobos] Suggestions for std.process
Sean Kelly
sean at invisibleduck.org
Mon Mar 8 07:46:55 PST 2010
In *nix you can set a signal handler to be notified when a child process completes. But the restrictions on what can be done inside a signal handler are such that maybe executing a callback from inside one isn't a good idea anyway.
On Mar 8, 2010, at 12:22 AM, Lars Tandle Kyllingstad wrote:
> I don't know any way of doing this besides spawning a separate thread that a) starts the process, b) waits for it to complete, and c) calls the callback function/delegate.
>
> Is this what you had in mind?
>
> -Lars
>
>
> Sean Kelly wrote:
>> I'm not sure if this is supported in Windows, but if so, it might be nice if I could set a callback that would be executed when the process completes.
>> On Mar 3, 2010, at 9:44 AM, Lars Tandle Kyllingstad wrote:
>>> Hi,
>>>
>>> Recently, I found myself in need of the functionality that is (or should have been) in std.process, but unfortunately I found it lacking in many respects. Assuming that improving it currently isn't at the top of the to-do list for Phobos, I decided not to wait, and rather to write my own version. If you want you can check it out here:
>>>
>>> Code: http://github.com/kyllingstad/ltk/blob/master/ltk/process.d
>>> Docs: http://kyllingen.net/code/ltk/doc/process.html
>>>
>>> I don't know if any of it is usable for Phobos, but if it is, I'd be happy to contribute.
>>>
>>> I've tried to write it in the style of std.concurrency, with a function spawnProcess() that returns a Pid struct. Currently it is for POSIX only, since I have no experience at all with the Windows API.
>>>
>>> -Lars
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
> --
> Lars Tandle Kyllingstad
> @: lars at kyllingen.net
> #: 40233221
> w: http://www.kyllingen.net
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list