Xref: utzoo comp.bugs.sys5:384 comp.unix.microport:281 comp.unix.xenix:1718 Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!agate!pasteur!ames!pacbell!att-ih!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.bugs.sys5,comp.unix.microport,comp.unix.xenix Subject: Re: FIFOs break tar, others Message-ID: <3776@chinet.UUCP> Date: 18 Mar 88 19:54:32 GMT References: <1512@sugar.UUCP> <2795@encore.UUCP> Reply-To: les@chinet.UUCP (Leslie Mikesell) Distribution: na Organization: Chinet - Public Access Unix Lines: 18 Summary: Don't read them >> >>tar, unfortunately, cannot be told to ignore or to properly "copy" FIFOs. >>-- > >Another version of tar which I've seen doesn't do a 'stat' first, but >does an open. On this version I added the O_NDELAY flag and put in >similar code. > Don't forget that reading from a FIFO deletes the data. Thus if you let tar or cpio read them, some other process is going to lose its input. Note also that the blocking effect only happens when no process has the FIFO open for write access. If there is an active process reading the FIFO (the typical use being to communicate with some background server process), the blocking can be avoided by having that process open the FIFO read/write even though it only intends to read. (Of course its own reads become non-blocking also..). Les Mikesell