Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2012-07-29 22:46:05 -0400
committerEugene Tarassov2012-07-29 22:46:05 -0400
commitca6b068938a5aadf59bd22b4299c46ccc4480ec3 (patch)
treea3936939f2ee022067a96c1be24adddf804e7621 /agent/tcf/framework
parentf158a806c2c569710f2cc2b84038b24a4a900cfe (diff)
downloadorg.eclipse.tcf.agent-ca6b068938a5aadf59bd22b4299c46ccc4480ec3.tar.gz
org.eclipse.tcf.agent-ca6b068938a5aadf59bd22b4299c46ccc4480ec3.tar.xz
org.eclipse.tcf.agent-ca6b068938a5aadf59bd22b4299c46ccc4480ec3.zip
Bug 385957 - trace support overwrites errno
Diffstat (limited to 'agent/tcf/framework')
-rw-r--r--agent/tcf/framework/trace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/agent/tcf/framework/trace.c b/agent/tcf/framework/trace.c
index 681f28a1..f652837c 100644
--- a/agent/tcf/framework/trace.c
+++ b/agent/tcf/framework/trace.c
@@ -60,6 +60,7 @@ static pthread_mutex_t mutex;
int print_trace(int mode, const char * fmt, ...) {
va_list ap;
+ int error = errno;
if (log_file == NULL) return 0;
if (mode != LOG_ALWAYS && (log_mode & mode) == 0) return 0;
@@ -100,6 +101,7 @@ int print_trace(int mode, const char * fmt, ...) {
}
}
va_end(ap);
+ errno = error;
return 1;
}

Back to the top