* Q about <(...)
@ 2000-04-03 7:11 Andrej Borsenkow
2000-04-03 9:48 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 2000-04-03 7:11 UTC (permalink / raw)
To: ZSH workers mailing list
bor@itsrm2% sudo pkgadd -d <(zcat SIN4C306+.pkg.Z)
Installation in progress. Do not remove the installation media.
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. As all files are closed by sudo this fails.
FIFO in this case would be really nice ... (yes, I can use =(...) but
sometimes I get patches of size 50-70MB and I want to avoid
uncomplressing it :-)
-andrej
Have a nice DOS!
B >>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Q about <(...)
2000-04-03 7:11 Q about <(...) Andrej Borsenkow
@ 2000-04-03 9:48 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-04-03 9:48 UTC (permalink / raw)
To: Andrej Borsenkow, ZSH workers mailing list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-03 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-03 7:11 Q about <(...) Andrej Borsenkow
2000-04-03 9:48 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).