My struggles aren't over yet. One last (Yeah, right) snafu.
Page 53 of Sun's "Programming Utilities & Libraries" manual (OS 4.1.1)
says "Unlike ordinary pipes, when the processes terminate, the named pipe
remains available for use by other processes." Unfortunately,
my named pipe seems to be only good for one use, then I have to
recreate it. Any ideas what I'm doing wrong?
Here's how I create it:
/usr/etc/mknod kw.bil p
# swab is my little utility for transposing bytes from a file off the
# CD-ROM
swab < /cdrom/image/raster/topo/etopo5b >kw.bil &
Here's how I use it:
wc kw.bil
The system responds correctly:
19375 28186 4672082 kw.bil
but then immediately tells me that my named pipe has finished:
[1] + Exit 155 swab < /cdrom/image/raster/topo/etopo5b > kw.bil
If I try to run it (wc kw.bil) again, it just sits there, no action
on the CD-ROM, until I kill it. It's the same story if I use:
cp kw.bil junk
It works once, then no more.
Am I invoking it wrong? This is the way a # of folks suggested I do
it. Or is the manual fibbing? Did I misunderstand the manual --
does it mean that I can associate something ELSE BESIDES swab with
kw.bil after the first time I invoke it? What if I just want to
always associate:
swab < /cdrom/image...
with kw.bil? Can I do that?
Thanks for all your past and future help --