From 462e08270e072dde709bb08e211c1d365bf103f8 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 17 Jul 2020 19:12:01 +0100 Subject: [PATCH] =?UTF-8?q?libsysprof-capture:=20Don=E2=80=99t=20unset=20S?= =?UTF-8?q?YSPROF=5FCONTROL=5FFD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By design, it needs to be usable from multiple threads so they can each request a thread-local mapped ring buffer. This becomes particularly obvious if you want to send `sysprof_collector_mark()`s from two libraries (say, GLib and libsoup); the first thread/library to call `sysprof_collector_mark()` will win. Signed-off-by: Philip Withnall --- src/libsysprof-capture/sysprof-collector.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libsysprof-capture/sysprof-collector.c b/src/libsysprof-capture/sysprof-collector.c index 9ffa9aae..1d7a0d61 100644 --- a/src/libsysprof-capture/sysprof-collector.c +++ b/src/libsysprof-capture/sysprof-collector.c @@ -316,8 +316,6 @@ request_writer (void) if (fdstr != NULL) peer_fd = atoi (fdstr); - unsetenv ("SYSPROF_CONTROL_FD"); - if (peer_fd > 0) { (void) set_fd_blocking (peer_fd);