Browse Source

logging: turn of stdout/stderr buffering

with this buffering disabled fancier logging scripts will
be able to process each line as it is output.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
tags/v0.5.0-rc1
Øyvind Harboe 11 years ago
parent
commit
241fd0b5a8
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/main.c

+ 4
- 0
src/main.c View File

@@ -35,5 +35,9 @@

int main(int argc, char *argv[])
{
/* disable buffering otherwise piping to logs causes problems work */
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);

return openocd_main(argc, argv);
}

Loading…
Cancel
Save