From owner-freebsd-hackers Sat Oct 7 14:41:51 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id OAA25629 for hackers-outgoing; Sat, 7 Oct 1995 14:41:51 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id OAA25612 for ; Sat, 7 Oct 1995 14:41:32 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id HAA03662; Sun, 8 Oct 1995 07:39:00 +1000 Date: Sun, 8 Oct 1995 07:39:00 +1000 From: Bruce Evans Message-Id: <199510072139.HAA03662@godzilla.zeta.org.au> To: FreeBSD-Hackers@FreeBSD.org, chuckr@eng.umd.edu Subject: Re: FIFO stuff Sender: owner-hackers@FreeBSD.org Precedence: bulk >I looked at the finger source, and the .plan file is checked to see if >it's there, and if it's non-zero length. OK, I got it to check if it was >a fifo, and if it was, not do the non-zero length check, but reading the >fifo seems to be a problem. Finger wants to do a character by character >read, and check if any of the returns are EOF. Since it may do a read >before masterplan has genned a new response file, it gets this EOF before >the masterplan program has had time to respond. Just reading it should work. The open should block until something writes the the fifo, and read should not return 0 until the fifo is not open for writing by any process. .plan must remain a fifo throughout. I don't think this can be made to work properly if masterplan replaces .plan with a fifo on the fly. Bruce