Thanks, Guys, for the insights so far. Well, I have been trying to figure out the best way to work-around my original issue, based on the inputs I received, but today I stumbled onto something really weird.

My perl thread is stuck in read(2) again but this time it is because some other completely unrelated thread has a reference to that pipe.

[root@onong 5227]# strace -s 1024 -p 5227 Process 5227 attached - interrupt to quit read(28, The fd in question is a pipe: [root@onong tmp]# ls -l /proc/5227/fd total 0 lr-x------ 1 root root 64 Feb 21 02:02 0 -> /dev/null l-wx------ 1 root root 64 Feb 21 02:02 1 -> /tmp/abc.log . . lr-x------ 1 root root 64 Feb 21 02:02 28 -> pipe:[28443] Following are the processes which have a reference to this pipe: [root@onong tmp]# lsof | grep 28443 perl 5049 root 28r FIFO 0,6 + 28443 pipe ntpd 9936 ntp 28r FIFO 0,6 + 28443 pipe ntpd 9936 ntp 29w FIFO 0,6 + 28443 pipe dhcpd 10228 root 28r FIFO 0,6 + 28443 pipe java 15518 root 28r FIFO 0,6 + 28443 pipe

As you can see, the ntpd process has the write-end of the pipe open!!!!

Any ideas as to how this is even possible????


In reply to Re^2: parent process stuck in read(2) on pipe opened to child process using backtick by onong
in thread parent process stuck in read(2) on pipe opened to child process using backtick by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.