Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> getenv, setenv, and realloc, all system calls

None of these 3 functions is a system call. open(), mmap(), sbrk(), poll(), etc. are system calls. What you're referring to is C library API, which as Go has shown (both to its benefit and its detriment) is optional on almost all operating systems (a major exception being OpenBSD.)

If you really want to lose some sanity I would recommend reading the man page for getauxval(), and then look up how that works on the machine level when the process is started. Especially on some of the older architectures. (No liability accepted for any grey hair induced by this.)

ed.: https://lwn.net/Articles/631631/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: