<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>The statement</p>
    <p>hfile = open pipe "/tmp/mypipe01" for watch  (or for read) never
      returns (acts like deadlock).</p>
    <p>It does actually create the pipe.</p>
    <p>Does gambas use fopen internally for access?  I get the same
      behavior in C if fopen is used instead of open.<br>
    </p>
    <p>There is a restriction:</p>
    <p class="p"><strong class="ph b">Restriction:</strong> If <samp
        class="ph codeph">fopen()</samp> is used to open
      named pipes in a multi-threaded environment, a deadlock will
      occur. This deadlock is caused by a named pipe waiting for the
      other end
      of the pipe to be opened, while still holding the <samp class="ph
        codeph">fopen()</samp> multi-thread
      mutex. To prevent this deadlock, use <samp class="ph codeph">open()</samp>
      to open
      the named pipe, instead of <samp class="ph codeph">fopen()</samp>.</p>
    <span class="keyword"></span><br>
    <br>
  </body>
</html>