Date: Sat, 7 Oct 1995 16:20:07 -0400 (EDT) From: Chuck Robey <chuckr@eng.umd.edu> To: FreeBSD Hackers <FreeBSD-Hackers@FreeBSD.org> Subject: FIFO stuff Message-ID: <Pine.SUN.3.91.951007160701.5492A-100000@espresso.eng.umd.edu>
next in thread | raw e-mail | index | archive | help
I was trying to help someone port an application to FreeBSD, something called masterplan, when I hit a problem that seems to be part of the OS. I'm not sure if this is an accepted limitation, or what, so I thought I'd get some opinions. Masterplan replaces your .plan file with a fifo, and responds to reads of the fifo using a nice set of rules. This allows folks, using some OSes, to have neat finger returns. The doc with masterplan warned it wouldn't work yet with AIX, but no mention of FreeBSD. I got it to compile easily by replacing a call to mknod to a mkfifo call, and catting the .plan file worked fine, but finger refused to believe there was a .plan file there. 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. Under SVR4, I think this'd be done by a polling kind of read, by streams, but I don't guess that's an option under FreeBSD. How else might finger be modified to work with this? BTW, I checked at the university's SUN4s running SunOS, and it works fine there. ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and n3lxx, both FreeBSD (301) 220-2114 | version 2.2 current -- and great FUN! ----------------------------+-----------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.951007160701.5492A-100000>
