On Fri, 15 Aug 2025 15:50:35 +1000
David Gibson
On Thu, Aug 14, 2025 at 07:12:55AM +0200, Stefano Brivio wrote:
On Thu, 14 Aug 2025 14:10:20 +1000 David Gibson
wrote: [snip] Here we're adding a new syscall to work around the problems with _exit(). In which case, why don't we add futex() to the syscall list and go back to exit(3).
Because futex() just came up unexpectedly and Paul and myself had to spend hours figuring that out, and there are good chances we'll get something else like that from glibc in the future.
Yes, but that could happen with literally any libc function, I'm not convinced that exit() is a target that deserves special attention.
From experience, it clearly did. Most of the other C library functions we call are relatively simple in comparison, and almost all the complicated implementations are directly implemented by system calls instead. Another notable exception was vsyslog(), and that's why we ship our own implementation for it. -- Stefano