add environ to proc_begin
Stefan Schuermans

Stefan Schuermans commited on 2020-05-17 13:11:40
Showing 1 changed files, with 4 additions and 0 deletions.

... ...
@@ -51,6 +51,10 @@ int lwpttr_event_proc_begin(void **data, size_t *size) {
51 51
                       &proc_begin.cmdline, cleaner) != 0) {
52 52
     return -1;
53 53
   }
54
+  if (stringlist_read("/proc/self/environ", &proc_begin.n_environ,
55
+                      &proc_begin.environ, cleaner) != 0) {
56
+    return -1;
57
+  }
54 58
 
55 59
   struct _Lwproctrace__Event event = LWPROCTRACE__EVENT__INIT;
56 60
   event.timestamp = &timestamp;
57 61