News for hackers. Stuff that matters.
Re:Fork is not my favourite syscall by tialaramex on Thursday January 04, 2018 @11:49AM (#16071783)
It doesn't matter which thing you do here. Almost all of NT is like that, if there's a feature you're sure NT has that Linux doesn't have, or vice versa, usually either you're wrong or the relevant team is working frantically to correct this mistake.

fork()/clone() obliges you to track which things the child doesn't want from the parent, and have a way to override them

CreateProcess obliges you to track which things the child DOES want from the parent, and have a way to override them.

There's a convergent evolution at work, the same way bats and birds have both got wings without a common ancestor having wings, wings work, not quite the _same_ wings, but the idea works, so it's inevitable.

futex() and WaitOnAddress have the same funhouse mirror effect. They're doing the same exact thing (very, very cheap synchronisation primitive, with just barely enough features to be useful), the names and descriptions are really different, but if you use both you're like "Oh, these are basically the same, huh". Both names are equally useless, futex() is a clever name if you already know what it does, but until you do you've no idea what to look for. On the other hand WaitOnAddress doesn't actually er, wait on an address, that would be expensive, like futex waking it up when something changes is _your_ job as the programmer.

Re:Fork is not my favourite syscall by cryptonector on Friday January 05, 2018 @01:27AM (#16076957)
WIN32 has a number of far, far superior features though, such as WaitForMultipleObjects(), Security Descriptors and Access Tokens, and SIDs. And its event system is like *BSD kqueue and Illumos event ports (i.e., it doesn't suck), while Linux's epoll() is... well, a disaster.
Re:Fork is not my favourite syscall by pjc50 on Thursday January 04, 2018 @11:56AM (#16071842)
Yes, but the distinction between "must enumerate things to child" and "child inherits everything" isn't symmetrical. I believe that it's better for security and reliability if the list is made explicit, but evidently not everyone agrees.