This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes General Computing and the fly likes Replacement for Named Pipes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Replacement for Named Pipes" Watch "Replacement for Named Pipes" New topic
Author

Replacement for Named Pipes

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
Hopefully a simple question to someone. Does anyone know a quick and painless way to represent named pipes (fr. Unix) in Windows? Thanks.
Rob
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Actually, Win32 does have something called "named pipes"; there's a CreateNamedPipe() system call! Unfortunately, the semantics are completely different. AFAIK, there's no other native IPC mechanism in Windows that's any closer, either.
I'm not sure, but I think that the Cygwin folks finally got around to implementing UNIX named pipes for Windows. If you're porting UNIX apps to Windows, Cygwin is definitely worth a look.


[Jess in Action][AskingGoodQuestions]
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
Thanks for the reply Ernest. I'm familar with the CreateNamedPipe system call but I don't think it will fit into the scenario I've been given. You see we have a Basic routine that is running and writing and reading from 2 pipes that were started on bootup (on a AIX machine). We also have 2 C programs that read from a certain device that read and write to these pipes, respectively, with data either retrieved or going to this device. Currently on the AIX we simply call the C program and since it either reads or writes to the pipes we are fine since the basic program is doing the same (well in reverse order). If I put the CreateNamedPipe into a C or VB or whatever program to generate a pipe will that pipe "stick" around after the program has terminated? Or does this CreateNamedPipe only create a scenario whereby the program it's in has to utilize it there and nowhere else, meaning once the program stops the pipes are closed? I understand pipes in Unix but wasn't sure if things were that much different in Windows. I apologize for the simplistic questioning but pipe interaction is still quite new to me as I haven't spent any time playing with them (this is my first go). Any help would be appreciated. Thanks in advance.
Rob
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Replacement for Named Pipes
 
Similar Threads
Legacy code problems
named pipes
UNIX standard IPC Function
how many ways do two java program communicate?
Pipe between Java and C processes?