|
From: <sv...@va...> - 2010-01-04 21:49:33
|
Author: sewardj
Date: 2010-01-04 21:49:25 +0000 (Mon, 04 Jan 2010)
New Revision: 11017
Log:
Disable pid caching for print output: it's wrong in a child after
a fork() and is very confusing.
Modified:
trunk/coregrind/m_libcprint.c
Modified: trunk/coregrind/m_libcprint.c
===================================================================
--- trunk/coregrind/m_libcprint.c 2010-01-04 21:05:42 UTC (rev 11016)
+++ trunk/coregrind/m_libcprint.c 2010-01-04 21:49:25 UTC (rev 11017)
@@ -470,6 +470,8 @@
/* Cache the results of getpid just once, so we don't have to call
getpid once for each line of text output. */
+ b->my_pid = -1; /* LATER: cacheing is confusing in presence of fork(),
+ disable for now. */
if (UNLIKELY(b->my_pid == -1)) {
b->my_pid = VG_(getpid)();
vg_assert(b->my_pid >= 0);
|