Taygrim
Taygrim

Reputation: 409

How to create pipe without buffer in C?

I want to create pipe without buffer, but I've found only setbuf() function that works only for file descriptors. Can you suggest something similar to it for pipes?

Upvotes: 0

Views: 1490

Answers (1)

Olaf Dietsche
Olaf Dietsche

Reputation: 74078

If you created the pipe with pipe, then you have already unbuffered file descriptors, besides the system buffers of course.

setbuf is for stdio files only and doesn't interfere, if you use plain system file descriptors.

Upvotes: 1

Related Questions