Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replacement for Named Pipes

 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic