summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-09-18 01:37:42 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-09-20 20:45:48 +0200
commit241fd0b5a8a95e814395f79b5ea7715c1862f045 (patch)
treea167e10ee9c4dcf6b6de074c13bafb8d9675cdbc /src
parent61780558e1654af0f3f20a332763b30bf533a912 (diff)
downloadopenocd+libswd-241fd0b5a8a95e814395f79b5ea7715c1862f045.tar.gz
openocd+libswd-241fd0b5a8a95e814395f79b5ea7715c1862f045.tar.bz2
openocd+libswd-241fd0b5a8a95e814395f79b5ea7715c1862f045.tar.xz
openocd+libswd-241fd0b5a8a95e814395f79b5ea7715c1862f045.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
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);
}