Name: sgC58550 Date: 03/21/97
Seems that opening a named pipe file blocks all other threads
in solaris. I run into this problem in a larger System and was
able to reproduce it with the following code snippet. This is
a serious bug, the whole process just "hangs" until
something is sent to the pipe. Run the program with a named
pipe named "namedpipe" in the current directory (to be created
with "mkfifo namedpipe").
Pipetest.java:import java.io.*;
class Pipetest extends Thread
{
public void run()
{
try
{
System.out.println("opening pipe");
new FileInputStream("namedpipe");
System.out.println("pipe open");
}
catch (Exception e)
{
e.printStackTrace();
}
}
public static void main(String args[])
{
System.out.println("Starting thread which opens a pipe");
new Pipetest().start();
System.out.println("Thread started");
while(true)
{
yield();
System.out.println("main thread running");
}
}
}
company - Union Bank of Switzerland , email - ###@###.###
======================================================================