zlacker

[return to "Transcending Posix: The End of an Era?"]
1. sylwar+Zk[view] [source] 2022-09-10 13:33:57
>>jsnell+(OP)
Richard Stallman POSIX now will have to do one of the hardest stuff in the software realm: resist planned obsolescence while replacing some interfaces with "in-the-end better" interfaces, that on the long run. This is extremely though: often, replacing "in-the-end better" interfaces is actually planned obsolescence.

For instance event based programming, "epoll" should replace "select". Synchronous programming, signalfd, timerfd, etc... but then "signals" should be more accurately classified, for instance in monothreaded applications segfault won't be delivered from a "signalfd" in a "epoll" syscall... and why not keep only the "realtime signal" behavior?

If POSIX only "add" new "options", in the end, you'll get gigantic spec just being the mirror image of the very few implementations since its size will make it unreasonable for a new implementation from scratch.

The "leaner POSIX" route seems the right way here, but it is really easier to say than to do.

◧◩
2. bitwiz+2F[view] [source] 2022-09-10 15:51:42
>>sylwar+Zk
No, I/O completion ports (which Linux only recently got a form of) should replace epoll and select.

fork() should be ditched.

◧◩◪
3. thetea+Kg1[view] [source] 2022-09-10 19:49:07
>>bitwiz+2F
> fork() should be ditched.

Why? In favor of what?

◧◩◪◨
4. bitwiz+ds1[view] [source] 2022-09-10 21:36:38
>>thetea+Kg1
Something like windows CreateProcess or posix_spawn().

fork() plays havoc with threads. If you want to start a new process, specify a fresh process image.

◧◩◪◨⬒
5. matu3b+FE1[view] [source] 2022-09-10 23:52:35
>>bitwiz+ds1
so does posix_spawn, since you can leak file descriptors into parallel spawning threads/processes before the execve (where they are closed if having O_CLEXEC).
◧◩◪◨⬒⬓
6. lgg+FN1[view] [source] 2022-09-11 01:36:15
>>matu3b+FE1
Yeah, that is a problem, and it is totally fixable. Checkout `POSIX_SPAWN_CLOEXEC_DEFAULT` on macOS for an example. Again, just because there are API deficiencies doesn't mean that the idea is wrong.
[go to top]