Date: Tue, 18 Feb 2003 19:55:19 +0100 (CET) From: Christian Weisgerber <naddy@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: obrien@FreeBSD.org Subject: ports/48434: shells/bash2: process substitution broken on 5.0 Message-ID: <200302181855.h1IItJXw008372@kemoauc.mips.inka.de>
next in thread | raw e-mail | index | archive | help
>Number: 48434 >Category: ports >Synopsis: shells/bash2: process substitution broken on 5.0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 18 11:00:05 PST 2003 >Closed-Date: >Last-Modified: >Originator: Christian Weisgerber >Release: FreeBSD 5.0-CURRENT alpha >Organization: >Environment: System: FreeBSD kemoauc.mips.inka.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Feb 5 13:01:08 CET 2003 naddy@kemoauc.mips.inka.de:/usr/obj/usr/src/sys/KEMOAUC alpha >Description: bash's process substitution feature is implemented by way of either /dev/fd/* or named pipes in /tmp. The configure script detects the existence of /dev/fd/ and chooses that scheme. However, 5.0's devfs only provides for /dev/fd/[0-2]. bash tries to use other descriptors and fails: bash$ cat <(cat /COPYRIGHT) cat: /dev/fd/63: No such file or directory The patch below checks whether higher descriptors are available before enabling the use of /dev/fd for process substitution. If the check fails, named pipes will be used instead. Note that mounting fdescfs on /dev/fd will enable higher descriptors. >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/shells/bash2/Makefile,v retrieving revision 1.60 diff -u -r1.60 Makefile --- Makefile 29 Sep 2002 01:44:12 -0000 1.60 +++ Makefile 18 Feb 2003 18:34:33 -0000 @@ -8,7 +8,7 @@ PORTNAME= bash PORTVERSION= 2.05b.004 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ Index: files/patch-ac =================================================================== RCS file: /home/ncvs/ports/shells/bash2/files/patch-ac,v retrieving revision 1.5 diff -u -r1.5 patch-ac --- files/patch-ac 4 Aug 2002 06:57:11 -0000 1.5 +++ files/patch-ac 18 Feb 2003 18:34:33 -0000 @@ -1,8 +1,8 @@ $FreeBSD: ports/shells/bash2/files/patch-ac,v 1.5 2002/08/04 06:57:11 obrien Exp $ ---- configure.orig Tue Jul 16 22:31:47 2002 -+++ configure Wed Jul 24 23:54:26 2002 +--- configure.orig Tue Jul 16 15:31:47 2002 ++++ configure Tue Feb 18 14:14:28 2003 @@ -1132,7 +1132,7 @@ mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir @@ -12,3 +12,19 @@ *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *-aix*) opt_bash_malloc=no ;; # AIX machines *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +@@ -15218,7 +15218,14 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -d /dev/fd && test -r /dev/fd/0; then +- bash_cv_dev_fd=standard ++ # FreeBSD's devfs only provides /dev/fd/[0-2] ++ exec 3<&0 ++ if test -r /dev/fd/3; then ++ bash_cv_dev_fd=standard ++ else ++ bash_cv_dev_fd=absent ++ fi ++ exec 3<&- + elif test -d /proc/self/fd && test -r /proc/self/fd/0; then + bash_cv_dev_fd=whacky + else >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302181855.h1IItJXw008372>