Re: How to know write end of FIFO has closed
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 01/21/05
- Next message: Chuck Dillon: "Re: QCTerm and Cobol in Unix"
- Previous message: Ian Stirling: "Re: How to know write end of FIFO has closed"
- In reply to: sandeep_onsite_at_yahoo.com: "How to know write end of FIFO has closed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 Jan 2005 22:50:58 -0500
In article <1106220462.714260.102690@f14g2000cwb.googlegroups.com>,
sandeep_onsite@yahoo.com wrote:
> Hi,
>
> How to check write end of a FIFO has been closed?
> My problem:
>
> My Linux syslog daemon(syslogd) is sending the syslog messages to a
> FIFO. my application daemon program keeps reading from FIFO using
> blocking read() call.
> When syslogd terminates, read() call always returns 0 bytes, indicating
> EOF. But how do I confirm 0 bytes read was due to syslogd closing the
> write end of the FIFO. Is there any way to check that write end is
> closed.
EOF on a pipe means that the write end was closed.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Chuck Dillon: "Re: QCTerm and Cobol in Unix"
- Previous message: Ian Stirling: "Re: How to know write end of FIFO has closed"
- In reply to: sandeep_onsite_at_yahoo.com: "How to know write end of FIFO has closed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|