aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtrace
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2019-09-10 17:32:30 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2019-09-10 17:32:30 -0400
commit7748916e6a66a586ae999b811a8ebb608120805e (patch)
treee9059a72ae5a8e5572c825dbe75fdda25d4b44ff /src/libtrace
parentappimage --trace testing (diff)
downloadfirejail-7748916e6a66a586ae999b811a8ebb608120805e.tar.gz
firejail-7748916e6a66a586ae999b811a8ebb608120805e.tar.zst
firejail-7748916e6a66a586ae999b811a8ebb608120805e.zip
libtrace cleanup
Diffstat (limited to 'src/libtrace')
-rw-r--r--src/libtrace/libtrace.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libtrace/libtrace.c b/src/libtrace/libtrace.c
index 745dd2260..11e98d95e 100644
--- a/src/libtrace/libtrace.c
+++ b/src/libtrace/libtrace.c
@@ -50,10 +50,7 @@ static orig_fopen64_t orig_fopen64 = NULL;
50// 50//
51// library constructor/destructor 51// library constructor/destructor
52// 52//
53// Replacing printf with fprintf to /dev/tty in order to fix #561 53// Using fprintf to /dev/tty instead of printf in order to fix #561
54// If you really want to turn it off, comment the following line, but its a
55// really bad idea.
56#define PRINTF_DEVTTY
57static FILE *ftty = NULL; 54static FILE *ftty = NULL;
58static pid_t mypid = 0; 55static pid_t mypid = 0;
59#define MAXNAME 16 56#define MAXNAME 16
@@ -67,11 +64,7 @@ void init(void) {
67 orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen"); 64 orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen");
68 65
69 // tty 66 // tty
70#ifdef PRINTF_DEVTTY
71 ftty = orig_fopen("/dev/tty", "w"); 67 ftty = orig_fopen("/dev/tty", "w");
72#else
73 ftty = stderr;
74#endif
75 tprintf(ftty, "=== tracelib init() === \n"); 68 tprintf(ftty, "=== tracelib init() === \n");
76 69
77 // pid 70 // pid