Skip to content

Commit c551de7

Browse files
committed
fix(event): Invalid thread id for Map/Unmap view file events
These events don't contain the thread id parameter, so trying to adjust the tid will always yield to an invalid value.
1 parent 88edf01 commit c551de7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/kevent/kevent_windows.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ func (e *Kevent) adjustPID() {
8383
e.PID, _ = e.Kparams.GetPid()
8484
}
8585
case ktypes.File:
86-
e.Tid, _ = e.Kparams.GetTid()
86+
if !e.IsMapViewFile() && !e.IsUnmapViewFile() {
87+
// take thread id from the event parameters
88+
e.Tid, _ = e.Kparams.GetTid()
89+
}
8790
switch {
8891
case e.InvalidPid() && e.Type == ktypes.MapFileRundown:
8992
// a valid pid for map rundown events

0 commit comments

Comments
 (0)