| PLEX86 | ||
|
buffering on named pipesCaptain Dondo When process A writes to the pipe (named or not), it goes into a buffer inside the kernel. Yes, from the buffer inside the kernel. It depends on your point of view. The sending process writes to the buffer (ultimately). The receiving process reads from the buffer (ultimately). The kernel actually does the buffering. help with serial port I need help, i can't figure out why this code doesnt work. I am using linux. All i want to be able to do is... You cannot have a buffer overrun. If the sending process writes more than the buffer can hold, the write call suspends until the receiving process consumes some, then writes some more, etc., until the count is satisfied. If the receiving process closes the pipe (e.g., by exiting), the sender gets an error return from the write(2) call. If the receiving process tries to read an empty buffer, it gets a count of 0 bytes. If the sending process has exited or otherwise closed the pipe, the receiving process gets an EOF return from the read(2) command (-1, probably, with something in errno, IIRC). man 2 pipe man read man write etc. -- .~. Jean-David Beyer Registered Linux User 85642. V PGP-Key: 9A2FC99A Registered Machine 241939. ^^-^^ 10:10:00 up 8 days, 3:12, 4 users, load average: 4.28, 4.26, 4.19
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||