Comment by dpassens
2 years ago
Only on systems where the syscall ABI is stable, like on Linux. Others, like macOS and Windows[0], can and will change theirs between releases. OpenBSD even goes one step further and actively prevents code other than libc from performing syscalls[1]
[0] I seem to remember that this changed in a recent Windows version, but I couldn't immediately find a source.
[1] msyscall(2) or, if you don't have an OpenBSD system at hand, https://man.openbsd.org/msyscall
No comments yet
Contribute on Hacker News ↗