title: FileInputStream blocks on the constructor when opening a named pipe
body: <p>Using Fedora 12: <code>mkfifo pipe</code> creates a pipe.</p>
  
  <p>When I use the following code to try to open an input stream against the named pipe it blocks on the FileInputStream constructor unless I create a writer to the pipe, such as opening another terminal and running: </p>
  
  <pre><code>tee pipe
  </code></pre>
  
  <p><br></p>
  
  <pre><code>public static void main(String[] args){
      try {
          File pipe = new File("/tmp/pipes_debugging/pipeToJava");
          System.out.println( pipe.canRead() );
          FileInputStream fis = new FileInputStream(pipe);
          System.out.println("exiting.");
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p><br></p>
  
  <h2>Output:</h2>
  
  <pre><code>true
  &lt;blocks - thread trace shown below&gt;
  </code></pre>
  
  <p><br></p>
  
  <pre><code>Thread [main] (Suspended)   
      FileInputStream.open(String) line: not available [native method]    
      FileInputStream.&lt;init&gt;(File) line: 137  
      PipesDebugging.main(String[]) line: 12  
  </code></pre>