Posted Jul 4, 2008 11:35 UTC (Fri) by walles (guest, #954)
Parent article: TASK_KILLABLE
Some languages throw exceptions when bad stuff (like an interrupted file write) happens. They
are easy to write in and is what most things should be written in.
Some languages (like C, assembler, C++) return error codes when bad stuff happens. These
error codes often get ignored. And programs written in these languages often have bugs of the
kind that are mentioned in this article. These languages are good for writing kernels and not
that much else.
Now, if people could just stick to the first kind of language for their user-space apps we
wouldn't be having these problems. If people could start writing their *kernels* in the first
kind of language, we would have even fewer problems (but there are a bunch of things that have
to be resolved before this happens).
Unfortunately, in practice, many people tend to go with the second kind of language for no
Things are getting better though. So maybe 10 years from now the uninterruptible sleeps can
be removed from the kernel.
Anyway, w00t for exception-throwing (and bounds-checking and garbage-collecting) languages!