Using the high bit to indicate an error result isn't unknown on other OSes either - see NTSTATUS on Windows, and HRESULT in COM.
This has nothing to do neither with high bit nor with NTSTATUS. For Linux, some values are errors, all others are normal results. lseek cannot return large value for example. At all.
Re:Anatomy of a system call, part 1
by willvarfar on Friday July 18, 2014 @05:55AM
(#8052318)
Please explain better ways for a syscall to return an error that negative status, and explain how OS other than Linux get it right.
Re:Anatomy of a system call, part 1
by justincormack on Friday July 18, 2014 @07:23AM
(#8052469)
Its Linux so you don't even need to look at a different OS. Each architecture is different. PowerPC returns the return value and error code in different registers which is very clean.
Edit: also Linux is made with completely moronic way to return errors (it uses some negative values as errors).