News for hackers. Stuff that matters.
Re:A fork() in the road by megous on Wednesday April 10, 2019 @08:03AM (#19623776)
> Of course, all Windows APIs are terrible, but that doesn't make complaints about fork() any less legitimate. The concept of Establishing empty processes, instead of cloning yourself, is much more sane.

I like the ease with which you can pass resources and data to the forked child from the parent, though. Otherwise I'd have to do a lot of serialiation and deserialization, or use shared memory, or unix sockets to pass fds, all of which also has it's gotchas and is way more complicated and error prone.

Re:A fork() in the road by arghwhat on Wednesday April 10, 2019 @09:13AM (#19624270)
But if you pass resources and data form forked child to parent, you are already using shared memory.

And, in this case, it sounds like a thread would do exactly what you want, but without the oddities of fork().

Re:A fork() in the road by zzzcpan on Wednesday April 10, 2019 @09:24AM (#19624371)
The memory is not shared, but copied, so you don't have to care about concurrent memory access.