Re: functions, process substitution, bad file descriptor

2009-02-28 Thread Ben Hyde
On Feb 27, 2009, at 4:02 PM, Chet Ramey wrote: Ben wrote: I ran into a problem using process substitution This will be fixed in the next version. thank you! ``The lyf so short, the craft so long to lerne.'' - Chaucer i've noticed

Re: functions, process substitution, bad file descriptor

2009-02-27 Thread Chet Ramey
Ben Hyde wrote: > I ran into a problem using process substitution. A much reduced version is > show below. The function f2 has the problem, the function f1 does not. > Are > there is some facts about the life cycle of the files created by > process substitution I don't appreciate? - ben This w

Re: functions, process substitution, bad file descriptor

2009-02-27 Thread Timothy Redaelli
Greg Wooledge eeg.ccf.org> writes: > For whatever it's worth, I can reproduce this behavior on both Linux > and OpenBSD (which use /dev/fd/*), in several versions of bash, but > not on HP-UX (which uses named pipes). I can reproduce it also with bash 4 and bash 3.2 under gentoo

Re: functions, process substitution, bad file descriptor

2009-02-27 Thread Greg Wooledge
On Fri, Feb 27, 2009 at 09:26:29AM -0500, Ben Hyde wrote: > f2(){ > date > cat $1 > } > f2 <(echo l8r) > Fri Feb 27 09:18:45 EST 2009 > cat: /dev/fd/63: Bad file descriptor For whatever it's worth, I can reproduce this behavior on both Linux and OpenBSD (which use /dev/fd/*), in several vers