programming with FIFO's

Anneke Sicherer-Roetman ANNEKE%HUTRUU54.BITNET at cunyvm.cuny.edu
Sat Mar 2 04:44:39 AEST 1991


In programming a spectrometer controller program I need the following:
- a spectrometer control program that runs as a detached continous
  process. This has monitoring and regulating tasks but meanwhile
  every few seconds has to find out if another process (see below) is
  talking to it.
- a terminal control program that is activated only when a researcher
  wants to tell the spectrometer something or read some message from it.
  This terminal control program, when activated from the system prompt,
  has to continually listen to the spectrometer program if it sends
  a message but meanwhile it must be able to take keyboard input and
  send this to the spectrometer control program. After he has done
  what he wanted to do the researcher exits from the terminal control
  program so that his terminal gets free for other things again.
This I wanted to implement with two FIFO's on either side. But my problem
is that NO FIFO read or write call may block until the other side listens
or talks because both programs have other things to do as well. When I
open the FIFO's with NO_DELAY I invariably get a No such device error on
our System V machine. Our BSD 4.3 machine however obeys an
open call with RDONLY|NODELAY so that things start to work. How can I
get this to work on a System V machine, because that really is the
machine the programs have to operate on?
Thanks for any suggestions,
Anneke Sicherer-Roetman, Systems programmer & chemist, Utrecht University



More information about the Comp.unix.questions mailing list