<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Pipes and close in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/pipes-and-close/m-p/3818196#M100291</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have written a program which has 2 threads.&lt;BR /&gt;Out of them One is main thread.&lt;BR /&gt;&lt;BR /&gt;Before creating one more thread, first i have created a pipe using pipe() system call.&lt;BR /&gt;In main thread i am trying to read on the read end file descriptor of the pipe. read is waiting to get some data from the pipe.&lt;BR /&gt;&lt;BR /&gt;In another thread after some time i am trying to close the same read end of the pipe.&lt;BR /&gt;&lt;BR /&gt;In this situation both read and close are sleeping and program is hanging.&lt;BR /&gt;&lt;BR /&gt;But the same example, i have tried in the solaris, close is closing and read is coming out as file descriptor became bad.&lt;BR /&gt;But in HP-UX close is not closing, and the program is hanging.&lt;BR /&gt;&lt;BR /&gt;Can anyone tell me why it is happening and how to overcome the hang situation&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Thu, 06 Jul 2006 00:03:52 GMT</pubDate>
    <dc:creator>sarram</dc:creator>
    <dc:date>2006-07-06T00:03:52Z</dc:date>
    <item>
      <title>Pipes and close</title>
      <link>https://community.hpe.com/t5/operating-system-linux/pipes-and-close/m-p/3818196#M100291</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have written a program which has 2 threads.&lt;BR /&gt;Out of them One is main thread.&lt;BR /&gt;&lt;BR /&gt;Before creating one more thread, first i have created a pipe using pipe() system call.&lt;BR /&gt;In main thread i am trying to read on the read end file descriptor of the pipe. read is waiting to get some data from the pipe.&lt;BR /&gt;&lt;BR /&gt;In another thread after some time i am trying to close the same read end of the pipe.&lt;BR /&gt;&lt;BR /&gt;In this situation both read and close are sleeping and program is hanging.&lt;BR /&gt;&lt;BR /&gt;But the same example, i have tried in the solaris, close is closing and read is coming out as file descriptor became bad.&lt;BR /&gt;But in HP-UX close is not closing, and the program is hanging.&lt;BR /&gt;&lt;BR /&gt;Can anyone tell me why it is happening and how to overcome the hang situation&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 06 Jul 2006 00:03:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/pipes-and-close/m-p/3818196#M100291</guid>
      <dc:creator>sarram</dc:creator>
      <dc:date>2006-07-06T00:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pipes and close</title>
      <link>https://community.hpe.com/t5/operating-system-linux/pipes-and-close/m-p/3818197#M100292</link>
      <description>Don't know enough about your setup, for example do you have streams/ux installed ?&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/J2237-90005/ch03s03.html#d0e1385" target="_blank"&gt;http://docs.hp.com/en/J2237-90005/ch03s03.html#d0e1385&lt;/A&gt;&lt;BR /&gt;and &lt;BR /&gt;man pipe&lt;BR /&gt;&lt;BR /&gt;I thought the timeout was 15 sec default.</description>
      <pubDate>Tue, 11 Jul 2006 04:42:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/pipes-and-close/m-p/3818197#M100292</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-07-11T04:42:09Z</dc:date>
    </item>
  </channel>
</rss>

