From owner-freebsd-bugs Sun Jul 19 22:41:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA27537 for freebsd-bugs-outgoing; Sun, 19 Jul 1998 22:41:33 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA27528 for ; Sun, 19 Jul 1998 22:41:32 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id WAA22290; Sun, 19 Jul 1998 22:40:01 -0700 (PDT) Received: from gatekeeper.alcatel.com.au (gatekeeper.alcatel.com.au [203.17.66.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA27292 for ; Sun, 19 Jul 1998 22:38:22 -0700 (PDT) (envelope-from peter.jeremy@alcatel.com.au) Received: from mfg1.cim.alcatel.com.au ("port 2803"@[139.188.23.1]) by gatekeeper.alcatel.com.au (PMDF V5.1-7 #U2695) with ESMTP id <01IZMN6DI7MO0011HR@gatekeeper.alcatel.com.au> for FreeBSD-gnats-submit@freebsd.org; Mon, 20 Jul 1998 15:37:32 +1000 Received: from gsms01.alcatel.com.au by cim.alcatel.com.au (PMDF V5.1-10 #U2695) with ESMTP id <01IZMN5Y1LB4IXSP2G@cim.alcatel.com.au> for FreeBSD-gnats-submit@freebsd.org; Mon, 20 Jul 1998 15:37:11 +1000 Received: (from jeremyp@localhost) by gsms01.alcatel.com.au (8.8.8/8.7.3) id PAA16828 for FreeBSD-gnats-submit@freebsd.org; Mon, 20 Jul 1998 15:37:24 +1000 (EST) Message-Id: <199807200537.PAA16828@gsms01.alcatel.com.au> Date: Mon, 20 Jul 1998 15:35:39 +1000 (EST) From: Peter Jeremy To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/7325: /bin/sh redirection does not match man page Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7325 >Category: bin >Synopsis: /bin/sh redirection does not match man page >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 19 22:40:01 PDT 1998 >Last-Modified: >Originator: Peter Jeremy >Organization: >Release: FreeBSD 2.2.6-RELEASE i386 >Environment: FreeBSD 2.2.6 >Description: sh.1 states: Redirection operators: < > >| << >> <& >& <<- <> ... [n]<> file open file for reading and writing on stdin (or n) But any attempt to use the '<>' operator results in the error "Syntax error: redirection unexpected". Looking at the code in 2.2.6-RELEASE, there is no evidence that this function was ever implemented. As well as the error message during parsing, none of the open(2) calls mention O_RDWR. This makes it impossible to do shell redirection for programs that want to read/write from the same FD. One such program is ppp(8). >How-To-Repeat: /bin/sh -c 'echo <> foo' >Fix: Changing the documentation would be easy. Making the code match the documentation would be more challenging. >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message