From 241fd0b5a8a95e814395f79b5ea7715c1862f045 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Sat, 18 Sep 2010 01:37:42 +0200 Subject: logging: turn of stdout/stderr buffering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index a71977da..9c7191d6 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); } -- cgit v1.2.3