Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!xadmx!rbj@dsys.ncsl.nist.gov From: rbj@dsys.ncsl.nist.gov (Root Boy Jim) Newsgroups: comp.unix.questions Subject: named pipe problem Message-ID: <20768@adm.BRL.MIL> Date: 1 Sep 89 16:32:48 GMT Sender: news@adm.BRL.MIL Lines: 27 ? From: coolbean [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@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