all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: EWOULDBLOCK and EINPROGRESS in process.c
Date: Tue, 24 Mar 2015 22:25:11 +0100	[thread overview]
Message-ID: <87wq2684w8.fsf@igel.home> (raw)
In-Reply-To: <83sicup8s0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Mar 2015 20:09:19 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> process.c has this fragment after it calls 'connect':
>
>   #ifdef NON_BLOCKING_CONNECT
>   #ifdef EINPROGRESS
> 	if (is_non_blocking_client && xerrno == EINPROGRESS)
> 	  break;
>   #else  <<<<<<<<<<<<<<<<<<<<<<<<<<<<
>   #ifdef EWOULDBLOCK
> 	if (is_non_blocking_client && xerrno == EWOULDBLOCK)
> 	  break;
>   #endif
>   #endif
>   #endif
>
> Can someone tell why we need that "#else" there?  Suppose there's a
> platform that has both values defined, but only returns EWOULDBLOCK
> when a non-blocking 'connect' is called -- that platform will fall
> through the cracks here.

POSIX only defines EINPROGRESS for this situation, so such a platform
would be buggy.

> Is there any problem to replace #else with #endif here?

I don't think it would make any difference in practice.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



  reply	other threads:[~2015-03-24 21:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 18:09 EWOULDBLOCK and EINPROGRESS in process.c Eli Zaretskii
2015-03-24 21:25 ` Andreas Schwab [this message]
2015-03-25 18:13   ` Eli Zaretskii
2015-03-24 23:42 ` Paul Eggert
2015-03-25 18:15   ` Eli Zaretskii

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=87wq2684w8.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.