I was wondering whether it would be legit to allocate a buffer for stdio stream buffering and use it with setvbuf
(before fork
), where the buffer is an anonymous mmap
-"allocated" piece of memory shared between parent and child process?
Assuming the two are synchronized, am I allowed to assume that the outcome will be something sane, or should I rather avoid this at all costs?