EAGAIN?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 19, 2005, 10:07 UTC
- Message-ID
- <7vhd95h02o.fsf@assigned-by-dhcp.cox.net>
I am embarrassed to ask this in public, but anyway.
I was looking at "git grep -n EAGAIN" output and found that many places check "errno == EAGAIN" without checking "errno == EINTR", both for read(2) and write(2). I feel that EAGAIN is probably not that useful (it probably would not hurt us, though) because we do not set up nonblocking ourselves, but I am wondering if there is particular reason to only check EAGAIN but not EINTR, or if they are just cut and paste errors.
apply.c:: read checks EAGAIN only, write checks both.
cat-file.c: write checks EAGAIN only.
copy.c:: read checks EAGAIN only, write checks both.
mktag.c:: read checks EAGAIN only.
pkt-line.c:: both read and write checks both.
tar-tree.c:: write checks EAGAIN only.
unpack-objects.c:: both read and write checks both.