Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 936
  • Last Modified:

Named Pipes in Unix

Under NT I have written code to use named pipes for interprocess and network communication. In Unix I know about anonymous pipes between processes on the same machine. Can I use named pipes in Unix?  How?
0
gumby119
Asked:
gumby119
1 Solution
 
davidmwilliamsCommented:
 Yes, named pipes exist in Unix and they are often called FIFOs.
  Create a named pipe using the mknod command or with the mkfifo function.  To create a named pipe called FRED do this,

mknod FRED p

You can modify the pipe's permissions like you do any other file.  The main advantage of named pipes is that they are bi-directional, either side canread or write.  You can manipulate the pipe like you do an anonymous pipe.  Note that the kernel does not distinguish between who is reading and who is writing so a process can actually read back what it wrote.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now