From 241fd0b5a8a95e814395f79b5ea7715c1862f045 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Sat, 18 Sep 2010 01:37:42 +0200 Subject: [PATCH 1/1] logging: turn of stdout/stderr buffering MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit with this buffering disabled fancier logging scripts will be able to process each line as it is output. Signed-off-by: Øyvind Harboe --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index a71977daf9..9c7191d6e3 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); } -- 2.30.2