On Wed, 28 Oct 2026 22:05:58 +0200
Michael S <alre…@yahoo.com> gabbled:
>On Wed, 28 Oct 2026 09:08:44 -0000 (UTC)
>bolt…@caprica.universe wrote:
>
>> On Mon, 26 Oct 2026 22:09:01 +0200
>> Michael S <alre…@yahoo.com> gabbled:
>> >On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)
>> >bolt…@caprica.universe wrote:
>> >> win32 can't do fork() making it effectively a totally useless API
>> >> for a lot of multiprocess development. Creating a brand new
>> >> process is fine if you don't need any complicated shared state
>> >> such as when kicking off something on the command line or creating
>> >> a pipe (something else win32 is shit at) but thats about it.
>> >>
>> >
>> >You are clueless about Windows. That's o.k.
>> >Your pretense that you know something about it is not o.k.
>> >In that regard you are not better than LDO.
>>
>> OK, whats the windows API call thats the equivalent of fork()? I'm not
>> talking about CreateProcessA() which doesn't even come close.
>>
>
>There is no equivalent for fork(). But nearly all things that Posix
>devs achieve by fork() followed by one or another magic incantation and
>then followed by exec() can be achived on Windows as well, typically by
>means of one or another magic flag in parameters of CreateProcess or
>of one of it's more complicated cousins (CreateProcessAsUser,
>CreateProcessWithLogon, CreateProcessWithToken, may be others). These
>things never fascinated me, so I am not an expert.
>
>Now, there were cases where Unix programmers used fork() without
>following it by exec(), but I would think that in the recent 25-30 years
>such programming patterns are discouraged in favor of threads.
Depends how much resilience you need. If the child process needs the state
of the parent but doesn't need to interact with it or any of the other child
processes much if at all and you're not creating dozens of them a second then
why would you use a thread with all the associated hassle of critical section
requirements, deadlocks, potential race conditions and one thread crashing
killing the whole application?