aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-20 01:00:07 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-20 01:00:07 -0500
commit95a3da9888af86a93732be4964da6aed5e523fcd (patch)
tree9517e2587b1ca698721dfa86eee65ce8ffd686a2 /libsandbox/trace.c
parentsb_efuncs: avoid pointless stdio indirection (diff)
downloadsandbox-95a3da9888af86a93732be4964da6aed5e523fcd.tar.gz
sandbox-95a3da9888af86a93732be4964da6aed5e523fcd.tar.bz2
sandbox-95a3da9888af86a93732be4964da6aed5e523fcd.zip
libsandbox: avoid mixing stderr & output pipes
The various debug helpers were changed to write out to a dedicated message path, but some of the trace code still uses stderr directly. When mixing these methods, the direct prints would sometimes be lost. Convert the few users to a new raw print function so they all route through the same file. We might want to extract this a bit more out in the future so it's easier to write to them, but this should be fine for now. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox/trace.c')
-rw-r--r--libsandbox/trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsandbox/trace.c b/libsandbox/trace.c
index d424389..5ccda2a 100644
--- a/libsandbox/trace.c
+++ b/libsandbox/trace.c
@@ -18,7 +18,7 @@ static long _do_ptrace(enum __ptrace_request request, const char *srequest, void
#else
# define SBDEBUG 0
#endif
-#define __sb_debug(fmt, args...) do { if (SBDEBUG) sb_printf(fmt, ## args); } while (0)
+#define __sb_debug(fmt, args...) do { if (SBDEBUG) sb_eraw(fmt, ## args); } while (0)
#define _sb_debug(fmt, args...) do { if (SBDEBUG) sb_ewarn("TRACE (pid=%i):%s: " fmt, getpid(), __func__, ## args); } while (0)
#define sb_debug(fmt, args...) _sb_debug(fmt "\n", ## args)