From: Øyvind Harboe Date: Fri, 17 Sep 2010 23:37:42 +0000 (+0200) Subject: logging: turn of stdout/stderr buffering X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=241fd0b5a8a95e814395f79b5ea7715c1862f045;p=fw%2Fopenocd 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 --- diff --git a/src/main.c b/src/main.c index a71977daf..9c7191d6e 100644 --- a/src/main.c +++ b/src/main.c @@ -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); }