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>
This commit is contained in:
Øyvind Harboe 2010-09-18 01:37:42 +02:00
parent 61780558e1
commit 241fd0b5a8
1 changed files with 4 additions and 0 deletions

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);
}