mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-18 13:09:11 +02:00
This sets the line-buffered mode for the stdout and stderr streams right at the start of the uD3TN daemon, preventing the loss of debug messages in the output. In the future we should implement this via a commandline parameter such as provided for e.g. tcpdump. Though, it is important to not send any output to stdout and stderr before issuing the setlinebuf call to be conformant with C99: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, p. 274 (PDF: 286) > The setvbuf function may be used only after the stream pointed to by stream > has been associated with an open file and before any other operation (other > than an unsuccessful call to setvbuf) is performed on the stream. Signed-off-by: Felix Walter <felix.walter@d3tn.com> |
||
|---|---|---|
| .. | ||
| main.c | ||