LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Piping to multiple processes (which might die)?

[ILUG] Piping to multiple processes (which might die)?

Brian Foster blf at utvinternet.ie
Wed Jul 31 17:35:56 IST 2002


  | Date: Wed, 31 Jul 2002 15:13:23 +0100
  | From: Ronan Cunniffe <ronan at cunniffe.net>
  | 
  | Um, my test was to tee to a fifo I didn't read from... resulting
  | in the other reader hanging around forever.... not realising that
  | never-opened-for-reading and opened-and-later-closed might be
  | different.

 ah!  yes!  this is one of those gotchas everyone stumbles
 over.  the writer of a never-opened-for-reading pipe will
 quickly block (as soon as the pipe's limited buffer fills
 up).  but the writer of opened-and-later-closed pipe gets
 an EPIPE error (and the usually-terminal SIGPIPE signal).

 the typical stumble is someone creates an anonymous pipe
 with pipe(2), but forgets to close(2) the reader's fd in
 the writer-process (or visa-versa) .... and then wonders
 why the real reader never sees an EOF and/or the writer
 is never gets an EPIPE/SIGPIPE.  various FAQs and many
 books probably discuss this topic in depth to the death.

  |             Sensible behaviour has now been observed.

 good!  and good luck.
cheers,
	-blf-
--
«How many surrealists does it take to    |  Brian Foster    Dublin, Ireland
 change a lightbulb?  Three.  One calms  |  e-mail: blf at utvinternet.ie
 the warthog, and two fill the bathtub   |  mobile: (+353 or 0)86 854 9268
 with brightly-coloured machine tools.»  |  http://www.blf.utvinternet.ie

    Stop E$$o (ExxonMobile):  «Whatever you do, don't buy Esso --- they
     don't give a damn about global warming.»    http://www.stopesso.com
     Supported by Greenpeace, Friends of the Earth, and numerous others...




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell