public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: David Howells <dhowells@redhat.com>,
	Andrew Morton <akpm@osdl.org>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arch@vger.kernel.org
Subject: Re: fcntl error
Date: Thu, 18 Mar 2004 18:47:51 +0100	[thread overview]
Message-ID: <jesmg6avy0.fsf@sykes.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0403180923190.880@ppc970.osdl.org> (Linus Torvalds's message of "Thu, 18 Mar 2004 09:30:16 -0800 (PST)")

Linus Torvalds <torvalds@osdl.org> writes:

> On Thu, 18 Mar 2004, David Howells wrote:
>> 
>> The attached patch fixes a minor problem with fcntl.
>
> I agree that it is a cleanup, but I disagree on the "problem" part.
>
>> get_close_on_exec() uses FD_ISSET() to determine the fd state. However,
>> FD_ISSET() does not return 0 or 1 on all archs. On some it returns 0 or non-0,
>> which is fine by POSIX.
>
> FD_ISSET() is broken if it returns anything but 0/1, in my not-so-humble 
> opinion.

POSIX clearly says that _any_ non-zero value is ok, similar to the ctype.h
functions.  Of course, the kernel can set different standards internally.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2004-03-18 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7051.1079628297@redhat.com>
2004-03-18 17:30 ` fcntl error Linus Torvalds
2004-03-18 17:47   ` Andreas Schwab [this message]
2004-03-19  9:38   ` David Howells

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=jesmg6avy0.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@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