*BSD News Article 5748


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!sol.ctr.columbia.edu!destroyer!lopez!scott
Newsgroups: comp.unix.bsd
Subject: [386BSD] can FIFO support be made to work?
From: scott@lopez.marquette.MI.US (Scott Reynolds,Insanity)
Message-ID: <Tzyle-iA1@lopez.marquette.MI.US>
Date: Tue, 29 Sep 1992 01:55:43 EDT
Organization: Great White North/UPLink
Lines: 29

I've added the necessary "options FIFO" to my configuration and done the
config, and I had to modify the .depend file manually to make sure that
the proper fifo.h file was picked up.  This was no real problem, and I
rebooted and made a fifo only to discover that opening the fifo for writing
caused the tty to hang.

A bit of investigation into the problem showed that the problem can happen
when opening the file for reading, also.  I made a couple minor changes to
no avail:  changed the priority parameter in each of the two tsleep() calls
to PSOCK | PCATCH and add a bzero(...) right after the memory allocation
when creating the fifo.

Liberal use of debug printf()'s traced the problem down to the fact that
the call to tsleep() never returns normally.  In fact, it appears to hang
every other process in the same sleep queue!  I have to admit that I am in
over my head here -- all I can say is that any process sleeping when I run
this program will sleep forever if I don't hit the interrupt key, and even
then it wouldn't wake up before I added PCATCH to the tsleep() call.

If anyone knows of the solution to this problem I'd be very grateful to
find out what it is.  If you have a patch, please mail it to the alternate
(BITNET) address below.  Any suggestions would be greatly appreciated even
if you don't know the solution...

Thanks in advance.
--
Scott Reynolds			scott@lopez.marquette.MI.US
Great White North/UPLink	alternate:  A094@NMUMUS.BITNET
	"Insufficient facts always invite danger." -- Spock