named pipe problem
Root Boy Jim
rbj at dsys.ncsl.nist.gov
Sat Sep 2 02:32:48 AEST 1989
? From: coolbean <nieters at copernicus.crd.ge.com>
[program deleted]
? If the program runs correctly, you will see the printf message of
? printf("%s: writing %s\n", argv[0], packet);
? followed by the printf message of
? printf("%s: preparing to read packet\n", argv[0]);
? after which the program will block indefinately on the read().
I think your problem is opening the pipe O_RDWR both times.
Try opening it O_RDONLY *first* and then O_WRONLY, or just
use the first file descriptor if you use O_RDWR.
I think that opening a FIFO for write access with no one to read it
blocks, but I can't find the reference in the SunOS 3.5 manuals.
That's why you have to open it for read access first.
? --ed
? -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
? Ed Nieters INTERnet: nieters at crd.ge.com
? GE Corporate R&D UUCPnet: uunet!crd.ge.com!nieters
? Schenectady, NY 12301 BELLnet: (518) 387-5187
Root Boy Jim and
the GNU Bohemians
More information about the Comp.unix.questions
mailing list