Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Q about <(...)
- X-seq: zsh-workers 10403
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: Q about <(...)
- Date: Mon, 3 Apr 2000 09:48:46 +0000
- In-reply-to: <000301bf9d3b$c9062e40$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000301bf9d3b$c9062e40$21c9ca95@xxxxxxxxxxxxxx>
On Apr 3, 11:11am, Andrej Borsenkow wrote:
} Subject: Q about <(...)
}
} pkgadd: ERROR: attempt to process datastream failed
} - open of </dev/fd/11> failed, errno=9
}
} Manual states, that <(...) creates a FIFO and passes it's name as
} argument ... obviously, it is not the case - it is simply passing opened
} file descriptor.
Not true, exactly:
zagzig[21] /bin/echo <(: foo)
/proc/self/fd/11
Zsh is over-optimizing a bit in this case; because PATH_DEV_FD was defined
at compile time, zsh simply uses that existing file name instead of making
its own new FIFO.
} As all files are closed by sudo this fails.
That's the unfortunate bit. Zsh is making an unwarranted assumption that
the file descriptor it opened will still be open by the time the file
name is referenced.
For guaranteed correct operation, we should remove the PATH_DEV_FD code
from getproc() in exec.c, or (perhaps better) change it to be used only
if mkfifo() is absent or fails.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author