Hacker News new | ask | show | jobs
by panzi 27 days ago
Why also capacity?

What I think would make sense is a change to the C API where the error code is an out parameter and not that ugly thread local errno. But I guess that's not big enough of an issue for people/languages that use libc as system call interface.

1 comments

You’re right; technically read–only access to a string only needs to know the pointer and length. I didn’t take the time to polish my message very much.

Errorno is stupid and annoying too, but I think that’s mostly a libc thing rather than a kernel thing. The syscalls themselves simply return error codes in a register as a return value. Worth fixing though.