Date: Mon, 20 Jul 1998 15:35:39 +1000 (EST) From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/7325: /bin/sh redirection does not match man page Message-ID: <199807200537.PAA16828@gsms01.alcatel.com.au>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807200537.PAA16828>