Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 1995 07:39:00 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        FreeBSD-Hackers@FreeBSD.org, chuckr@eng.umd.edu
Subject:   Re: FIFO stuff
Message-ID:  <199510072139.HAA03662@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510072139.HAA03662>