From owner-freebsd-questions Wed Jul 17 4: 9:23 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40E1937B400 for ; Wed, 17 Jul 2002 04:09:20 -0700 (PDT) Received: from mailc.telia.com (mailc.telia.com [194.22.190.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A6B043E31 for ; Wed, 17 Jul 2002 04:09:19 -0700 (PDT) (envelope-from mauritz.sundell@telia.com) Received: from d1o89.telia.com (d1o89.telia.com [213.66.60.241]) by mailc.telia.com (8.11.6/8.11.6) with ESMTP id g6HB9HG23641; Wed, 17 Jul 2002 13:09:17 +0200 (CEST) Received: from gilgamesh (h131n1fls31o89.telia.com [213.66.60.131]) by d1o89.telia.com (8.10.2/8.10.1) with SMTP id g6HB9GK29759; Wed, 17 Jul 2002 13:09:16 +0200 (CEST) Message-ID: <013601c22d83$1814b090$0e81a8c0@gilgamesh> From: "Mauritz Sundell" To: "Abc Xyz" Cc: "freebsd-questions" References: <200207160805.g6G85rRA001665@anchorageinternet.org> Subject: Re: /dev/null and 2>&- Date: Wed, 17 Jul 2002 13:14:18 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Abc Xyz" To: "freebsd-questions" Sent: Tuesday, July 16, 2002 10:05 AM Subject: /dev/null and 2>&- > i just installed 4.6-RELEASE, and notice that > the '2>&-' sh (FBSD) construct seems to be broken. > i am going thru all my scripts having to change > it to /dev/null ... In what way is it broken? If the construct is generally used for hiding errormessages, one should probably replace it with '2>/dev/null' anyway, since 2>&- only closes filedescriptor 2 at startup of program and the first file the program opens will be assigned the very same and all output to stderr will come up in that file. Example, sh> tee < /dev/null 2>&- empty /nonexistent/missingfile sh> cat empty tee: /nonexistent/missingfile: No such file or directory sh> sh> tee < /dev/null 2>/dev/null empty /nonexistent/missingfile sh> cat empty sh> > > i figure it's not realistic to assume a bug this > obvious would make it to release stage, so my > question is - is something else going on? > or is this just due to changes in 'sh'? > is it a bug? or is it a permenent change? > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Mauritz Sundell, mauritz.sundell@telia.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message