Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2002 21:54:28 -0400 (EDT)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        Johan Karlsson <johan@FreeBSD.ORG>
Cc:        freebsd-bugs@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG
Subject:   Re: kern/11020: popen does not honor ISO 9899 syntax
Message-ID:  <200208230154.g7N1sSqm013189@khavrinen.lcs.mit.edu>
In-Reply-To: <200208230032.g7N0WXNU018603@freefall.freebsd.org>
References:  <200208230032.g7N0WXNU018603@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 22 Aug 2002 17:32:33 -0700 (PDT), Johan Karlsson <johan@FreeBSD.ORG> said:

>       the popen() library function does not recognize the optional "b"

> 	Is this something we want to/ should do?

Probably not; such a feature is both unnecessary and would encourage
unportable code.  The POSIX rationale notes:

# The behavior of popen( ) is specified for values of mode of r and
# w. Other modes such as rb and wb might be supported by specific
# implementations, but these would not be portable features.  Note
# that historical implementations of popen( ) only check to see if the
# first character of mode is r. Thus, a mode of robert the robot would
# be treated as mode r, and a mode of anything else would be treated
# as mode w.

Note that the specification is somewhat poorly written, in that the
literal mode strings "r" and "w" are not properly identified as such.
This is actually a general typographical shortcoming of the Standard.

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208230154.g7N1sSqm013189>