[Top][All Lists]

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

Re: possible recvfd() improvement

From: Jim Meyering
Subject: Re: possible recvfd() improvement
Date: Sat, 21 Dec 2013 10:10:03 -0800

On Fri, Dec 20, 2013 at 11:27 PM, Eric Blake <address@hidden> wrote:
> I noticed that recvfd() fails with errno set to EACCES if the other end
> of the socket has closed (such as if it calls _exit()); but "Permission
> denied" as the strerror() message doesn't read very well.  Any
> objections to a patch along these lines to give a nicer error message
> "Transport endpoint is not connected"?  Or any better errno value to
> diff --git i/ChangeLog w/ChangeLog
> index 25b59e3..f608556 100644
> --- i/ChangeLog
> +++ w/ChangeLog
> @@ -1,3 +1,8 @@
> +2013-12-21  Eric Blake  <address@hidden>
> +
> +       passfd: give nicer error for recvfd at eof
> +       * lib/passfd.c (recvfd): Fake ENOTCONN if other end closes early.

Hi Eric,
I like the idea and the patch looks fine.
Two suggestions:
  - include your justification paragraph or similar as a comment or in
    the commit log. It's good to preserve that perspective for posterity.
  - consider adding your new test (but I suspect doing it right
    would require enough effort to make it not worthwhile)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]