git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Cc: torvalds@osdl.org
Subject: EAGAIN?
Date: Mon, 19 Dec 2005 02:07:27 -0800	[thread overview]
Message-ID: <7vhd95h02o.fsf@assigned-by-dhcp.cox.net> (raw)

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.

             reply	other threads:[~2005-12-19 10:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-19 10:07 Junio C Hamano [this message]
2005-12-19 19:46 ` EAGAIN? Linus Torvalds
2005-12-19 22:23   ` EAGAIN? H. Peter Anvin
2005-12-20  0:55     ` [PATCH] xread/xwrite: do not worry about EINTR at calling sites Junio C Hamano
2005-12-20 10:40       ` Johannes Schindelin
2005-12-20 18:59         ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vhd95h02o.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).