Date: Mon, 6 Sep 1999 12:27:54 +0400 (MSD) From: Alex Povolotsky <tarkhil@asteroid.svib.ru> To: Bruce Evans <bde@zeta.org.au> Cc: hackers@freebsd.org Subject: Re: kern/13593: Problems with FIFO and select Message-ID: <14291.31498.931690.690026@shuttle.svib.ru> In-Reply-To: <199909060746.RAA29518@godzilla.zeta.org.au> References: <199909060746.RAA29518@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "Bruce" == Bruce Evans writes: >>> Description: >> Attempt to open FIFO file with O_WRONLY|O_NONBLOCK results in >> Device not configured error. Bruce> This is because there is no reader when the FIFO is opened for Bruce> writing (O_WRONLY opens of FIFOs normally block waiting for a Bruce> reader, but O_NONBLOCK gives an error instead). Well, but how do I multiplex on FIFO opening? >> However, when FIFO is opened with O_RDWR and O_NONBLOCK, every >> attempt to select(2) its handler for writing doesn't wait until >> someone opens FIFO for reading, but instead FIFO is ready to write >> at every select. Bruce> This is because O_RDWR gives both a reader and a writer. Well again, both things are reasonable, but I wanted to do the following: (1) open a control FIFO, for external commands (2) open a status FIFO, for status reporting (3) open several sockets for internal usage and than select() on all of them, waiting for either command to arrive, request for status, or (some internal event, select()-multiplexable). I can implement this using UNIX sockets and external programs, but can I make status reporting without external program? -- Alexander B. Povolotsky [ICQ 18277558] [2:5020/145] [http://freebsd.svib.ru] [tarkhil@asteroid.svib.ru] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14291.31498.931690.690026>