name pipe to communicate between c\c++ and java
hi !
I need to communicate between parts of an application, running on the same macine, but in different language,
one part in java and the other in c\c++.
JNI can solve the problem but my boss want to do it via "named pipes". my problem is how can i create a pipe that another (C++) thread can pick up by name? and how do I pick up the end of an existing named pipe?
some one can help my with that ? (some example and documentation or explanation can be very helpfull)
[515 byte] By [
zvikaha] at [2007-9-26 1:47:11]

Create the pipe (either ahead of time in a shell script, or exec() it from C++ or Java) with mkfifo.
Make the fifo writable to your writer(s) and readable to your reader.
chown readusr:writgrp /path/to/fifo
chmod 620 /path/to/fifo
You open and write it like a regular file from any program.
Reads block by default until there is something to read.
You ougtta be able to take it from here. If not, email me and I'll cut out appropriate parts from an app of mine which writes to the fifo from perl and it from Java.