View topic - question about FIFO

question about FIFO

anything that doesn't fit to other groups.

question about FIFO

Postby xuyong » Fri Sep 05, 2003 2:58 am

I use mkfifo() to create FIFO to transfer data between processs,I want to know if sometime one process that read the data can't read it in time, what happen to the process that write the data,blocked or dead?
xuyong
Senior Member
 
Posts: 431
Joined: Sun Mar 02, 2003 7:52 am

Postby xtang » Fri Sep 05, 2003 3:38 am

The library reference of "write()" have a detail discustion of write into a FIFO.
In short, the write() will either block or fail with EAGAIN, depends on the setting.
there is no reason the writing processwould "die".
xtang
QNX Master
 
Posts: 313
Joined: Thu Jul 18, 2002 5:01 pm

Postby xuyong » Fri Sep 05, 2003 6:46 am

I use O_NONBLOCK to open fifo to write(I create 2 FIFO),but when I simulate that 1 of 2 FIFO can't be read in time,the process writing continue to run(one write() must fail),but the other process that read fifo can't get data,why?
xuyong
Senior Member
 
Posts: 431
Joined: Sun Mar 02, 2003 7:52 am


Return to General Programming

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest

cron