From peter.jeremy@alcatel.com.au Sun Jul 19 22:38:30 1998 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 Subject: /bin/sh redirection does not match man page X-Send-Pr-Version: 3.2 >Number: 7325 >Category: bin >Synopsis: /bin/sh redirection does not match man page >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 19 22:40:01 PDT 1998 >Closed-Date: Wed Mar 31 13:02:18 PST 1999 >Last-Modified: Wed Mar 31 13:02:49 PST 1999 >Originator: Peter Jeremy >Release: FreeBSD 2.2.6-RELEASE i386 >Organization: >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. >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: brian State-Changed-When: Wed Mar 31 13:02:18 PST 1999 State-Changed-Why: Fixed in -current. >Unformatted: