PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Named Pipes in C


Your Ad Here

Your Ad Here

You probably want to put the "reader" and the "writer" in separate Windows.

Second, write your "You just typed..." to stderr instead of stdout. Finally, in both windows, you might want to try using "stty raw" to turn off the echo on input.

You might also want to test the input for EOF or some other "end of messages" indicator.

Remember that a pipe, named or otherwise is a block of memory which is filled by one program, then pbutted to another program. Typically it's a very small block of memory.

You can also use the "mknod -p" option to create the named pipe.

you may also want to use fsync() or flush() to force the hand-off. Remember that the default behavior is to wait until the buffer is full before pbutting control to the receiving program.

Try the following to confirm the FIFO.

In "Terminal 1" screen:

$ mkfifo --help Usage: mkfifo OPTION NAME... Create named pipes (FIFOs) with the given NAMEs.

Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set permission mode (as in chmod), not a=rw - umask --help display this help and exit --version output version information and exit

$ pwdhome-rexbalrd

$ ls mqscripts winhome

Firefox keep alive extension
On Fri, 10 Feb 2006 16:59:28 +0000, Roy Schestowitz staggered into the Black Sun and said: The free ones...

$ mkfifo testfifo

In terminal 2: $ ls mqscripts testfifo winhome

In Terminal 1:

Question about nvidia video card
On 10 Feb 2006 10:24:50 -0800, Vilmos Soti staggered into the Black Sun and said: nForce 1234 is the name for a specific type of Northbridge and Southbridge chipset that's found on quite...

The "hello" should appear in terminal 2.

Now, replace the "cat" program with your C++ program on terminal 2.



Your Ad Here

List | Previous | Next

Firefox keep alive extension

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

A potentially annoying pair of newbie questions