简体   繁体   中英

Inter Process Communication FIFO java

Hi I'm trying to Implement a IPC in Java with FIFO I cretaed a FIFO with with

mkfifo temp

then I tried to open and FileWriter with

BufferedWriter writeStream = new BufferedWriter(new FileWriter(writePipePath));

but it blocks at this line.

Any idea what the problem could be?

As you can read in the mkfifo manual page , opening a fifo will block until both sides are open. FileWriter opens the named pipe synchronously - ie, it will not return until the pipe is also opened for reading, by another process or another thread.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM