diff options
Diffstat (limited to 'src/lwp.c')
-rw-r--r-- | src/lwp.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -137,6 +137,7 @@ _lwp_write_events (const LWP_EventRecord *events, guint n_events) struct sockaddr_un addr; int sk; guint32 time; + pid_t pid; guint n; const char *env; LWP_Symbol *ip; @@ -160,6 +161,10 @@ _lwp_write_events (const LWP_EventRecord *events, guint n_events) if (! _lwp_writen (sk, "LWP", 4)) goto CLEAN_SK; + pid = getpid(); + if (! _lwp_writen (sk, &pid, sizeof (pid))) + goto CLEAN_SK; + time = _lwp_read_time (); if (! _lwp_writen (sk, &time, sizeof (time))) goto CLEAN_SK; @@ -227,10 +232,6 @@ _lwp_write_events (const LWP_EventRecord *events, guint n_events) switch (events[n].type) { case LWP_INIT: - if (! _lwp_writen (sk, &ev->init.pid, sizeof (ev->init.pid))) - { - goto CLEAN_SK; - } break; case LWP_FINI: @@ -622,7 +623,6 @@ __lwp_init (void) if (_lwp_initialized++) return; - event.init.pid = getpid(); _lwp_record_event (LWP_INIT, &event); _lwp_events_initialized = TRUE; |