title: Named pipe blocking with user nobody
body: <p>I have 2 short scripts. The first, an awk script, processes a large file  and prints to a named pipe 'myfifo.dat'. The second, a Perl script, runs a <code>LOAD DATA LOCAL INFILE 'myfifo.dat'...</code> command. Both of these scripts work when run locally like so:</p>
  
  <pre><code>lee.awk big.file &amp;
  lee.pl
  </code></pre>
  
  <p>However, when I call these scripts from a PHP webpage, the named pipe blocks:</p>
  
  <pre><code>$awk="/path/to/lee.awk {$_FILES['uploadfile']['tmp_name']} &amp;";
  $sql="/path/to/lee.pl";
  
  if(!exec($awk,$return,$err)) throw new ZException(print_r($err,true)); //blocks here
  if(!exec($sql,$return,$err)) throw new ZException(print_r($err,true));
  </code></pre>
  
  <p>If I modify the awk and Perl scripts so that they write and read to a normal file, everything works fine from PHP. The permissions on the fifo and the normal file are 666 (for testing purposes). These operations run much more quickly through a named pipe, so I'd prefer to use one.  Any ideas how to unblock it?</p>
  
  <p>ps. In case you're wondering why I'm going to all this aggravation, see <a href="https://stackoverflow.com/questions/2420140/malformed-packet-error-during-mysql-load-data-local-infile">this SO question</a>.</p>