3 ms·
Go isn't obligated to use any libc APIs or abstractions other than those providing syscalls. You're incorrect or maybe just misleading about libc created file
by loeg 7y ago
Go isn't obligated to use any libc APIs or abstractions other than those providing syscalls.
You're incorrect or maybe just misleading about libc created file descriptors inheriting, as stated. Either way, it is unrelated to using libc for syscalls vs bare machine traps.
- giovannibajo1 7y agoI think it's mandated by POSIX standard; but even if I'm wrong, there's still the problem that libc doesn't allow to do that atomically, for instance. In general, it's an old interface that doesn't fully expose the full power of all modern syscalls.
- tedunangst 7y agoMost libc you'd care to use are going to include functions like dup3. If they don't, it's probably because the system call isn't available either.
- loeg 7y agoYou're mistaken. https://news.ycombinator.com/item?id=21740035 https://news.ycombinator.com/item?id=21740035 https://news.ycombinator.com/item?id=21740498 https://news.ycombinator.com/item?id=21740498