digitalmars.D.learn - Disable wrilten buf in docker
- zoujiaqing (3/3) Mar 11 Hi, my application use writeln in docker don't display.
- Richard (Rikki) Andrew Cattermole (2/2) Mar 11 On D's side you can use ``stdout.flush;`` to force it to flush.
- zoujiaqing (8/10) Mar 12 OK, thank you!
- Steven Schveighoffer (5/8) Mar 12 Use setvbuf to switch to line buffering. Then you don’t have to
- zoujiaqing (4/14) Mar 13 Thank you Steve!
Hi, my application use writeln in docker don't display. Python add -u disable it. https://stackoverflow.com/questions/29663459/why-doesnt-python-app-print-anything-when-run-in-a-detached-docker-container
Mar 11
On D's side you can use ``stdout.flush;`` to force it to flush. I don't think there is a way to force flushing via CLI.
Mar 11
On Tuesday, 12 March 2024 at 06:39:40 UTC, Richard (Rikki) Andrew Cattermole wrote:On D's side you can use ``stdout.flush;`` to force it to flush. I don't think there is a way to force flushing via CLI.OK, thank you! Problem solved! Use code: ```D std.stdio.stdout.flush(); ```
Mar 12
On Tuesday, 12 March 2024 at 06:36:09 UTC, zoujiaqing wrote:Hi, my application use writeln in docker don't display. Python add -u disable it. https://stackoverflow.com/questions/29663459/why-doesnt-python-app-print-anything-when-run-in-a-detached-docker-containerUse setvbuf to switch to line buffering. Then you don’t have to manually flush everything https://en.cppreference.com/w/c/io/setvbuf -Steve
Mar 12
On Tuesday, 12 March 2024 at 15:44:08 UTC, Steven Schveighoffer wrote:On Tuesday, 12 March 2024 at 06:36:09 UTC, zoujiaqing wrote:Thank you Steve! how to use it in global?Hi, my application use writeln in docker don't display. Python add -u disable it. https://stackoverflow.com/questions/29663459/why-doesnt-python-app-print-anything-when-run-in-a-detached-docker-containerUse setvbuf to switch to line buffering. Then you don’t have to manually flush everything https://en.cppreference.com/w/c/io/setvbuf -Steve
Mar 13