tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: partial failures in write(2) (and read(2))



On Thu 11 Feb 2021 at 09:41:50 -0500, John Franklin wrote:
> From the application?s perspective of calling write() in libc, when
> there is such an error the libc function could return a short response
> and set errno.  That doesn?t work so much for the kernel?s system
> call.

A system call with error can return with the carry set and the error and
short count returned in a separate registers. The carry bit is how
errors used to be indicated since at least V7 (even V6?) anyway.

-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.       --Douglas Adams, "THGTTG"

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index