Re:liblinux: Architecture-independent access to Linux system...
by GoblinSlayer on Tuesday November 09, 2021 @05:54AM
(#29160046)
Design of unix was influenced more by PDP-7 than by C. What unix does, it does PDP-7 stuff, not C stuff. C itself isn't limited to POSIX.
So, kernel was written in C and therefore uses C data structures, pointers, and follows C conventions for using them (for example, kernel might return a struct of pointers). This applies to interfaces and structures, making syscalls (depending on which syscall and what is needed), checking return values or error codes.
You don’t NEED this stuff exactly to run on Unix. What and how much you need, or even just convenience, are how it boils down. If you want to use eBPF to trace things from raw network packets, syscalls, file systems, you can do some in Python but you’ll need some degree of C.
You want to run a Django or flask app in just Python? Good to go.
[This article on Linux ABI](https://en.wikipedia.org/wiki/Application_binary_interface) might help explain better/in more detail.
Sorry if this isn’t the best explanation, I’m on mobile and up too late.