forks/pipes and std.socket
Nick Sabalausky
a at a.a
Tue Sep 7 13:51:48 PDT 2010
"Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message
news:op.vioibdr2eav7ka at localhost.localdomain...
> On Tue, 07 Sep 2010 14:54:46 -0400, Nick Sabalausky <a at a.a> wrote:
>
>> "Kagamin" <spam at here.lot> wrote in message
>> news:i660qi$nud$1 at digitalmars.com...
>>> Nick Sabalausky Wrote:
>>>
>>>> Does anyone who's done this sort of thing in D before, on Win or Lin,
>>>> know
>>>> of anything else in particular to be aware of?
>>>
>>> There's no fork on windows. If you want a multithreaded server, it's
>>> usually implemented with threads on windows.
>>
>> That was just an example. CreateProcess/spawn/system are fine for my
>> purposes. I'm just talking about creating a child process and
>> communicating
>> with it via pipes.
>
> The upcoming std.process changes will make this easy.
>
Ah cool, looking forward to it. I was just about ready to launch into a
bunch of std.process improvements myself ;) In the meantime, it seems that
File has an undocumented constructor that takes a file handle instead of a
filename, so that should work for me.
BTW, do any of the upcoming std.process changes do anything to help work
around Windows's exec being broken? By that I mean, exec is supposed to
*reuse* the current process when launching the new one, but on Windows (and
I *don't* believe this is D-specific) it creates a *new* process and kills
the old one, which fucks up anything that waits on the original process to
finish (such as the command-line). spawn(OVERLAY) has the same problem.
More information about the Digitalmars-d-learn
mailing list