2 ms·
There was no complex stuff like SMP, no netfilter or similar. Software in and before the 90s was written with extreme naivety; buffers would be blindly allocate
by DayOfTheSeal 3y ago
There was no complex stuff like SMP, no netfilter or similar. Software in and before the 90s was written with extreme naivety; buffers would be blindly allocated / assumed based on user (even network) supplied input. This makes code much simpler, even with bloated designs like UNIX. If you think about it, UNIX actually can't even be defined, you just have a way to execute programs, some process management (in this case which is overly defined for no reason, with superfluous concepts like process groups), the UNIX file system with a permission model that only needs a hundred lines of code, and output (and input) just goes to a terminal that interprets it however it wants. It has no say on anything so that's why you have 13 different programming languages that all do the same thing, dumping files all over the place trying not to stomp on each other, a shell language which itself is so poorly defined that people aren't even sure if comparing something to empty string is portable, no standard way to pass around data (just strings, whose encoding changes every 5 years), even the encoding of file names.
On the other hand, UNIX is bloated with garbage like `wall`, the ability to output text into another user's terminal, metadata all over the place with no discipline, like ps being able to see other users' command line including if they typed a password in it (security is a bonus but beside the point: you shouldn't expose data through an API that isn't explicitly needed for the purpose the API purports to serve). Stuff like hostnames, DNS, email, are built into the kernel in various ways. This could answer why it needs a whopping 13KLOC.