summaryrefslogtreecommitdiff
path: root/internal/eventloop.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/eventloop.go')
-rw-r--r--internal/eventloop.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/internal/eventloop.go b/internal/eventloop.go
index b451b69..102a500 100644
--- a/internal/eventloop.go
+++ b/internal/eventloop.go
@@ -238,29 +238,27 @@ func (e *eventLoop) syscallExit(exitEv event.Event, ch chan<- *event.Pair) {
}
case *FcntlEvent:
ev.Comm = e.comm(ev.EnterEv.GetTid())
- if !e.filter.eventPair(ev) {
- ev.Recycle()
- return
- }
fd := int32(v.Fd)
if file_, ok := e.files[fd]; ok {
ev.File = file_
} else {
ev.File = file.NewFdWithPid(fd, v.Pid)
}
+ if !e.filter.eventPair(ev) {
+ ev.Recycle()
+ return
+ }
switch v.Cmd {
case syscall.F_SETFL:
fdFile, ok := ev.File.(file.FdFile)
if !ok {
panic("expected a file.FdFile")
}
- fmt.Println("DEBUG BEFORE", fdFile.FlagsString())
// fcntl(2)
canChange := syscall.O_APPEND | syscall.O_ASYNC | syscall.O_DIRECT | syscall.O_NOATIME | syscall.O_NONBLOCK
fdFile.Flags |= (int32(v.Arg) & int32(canChange))
ev.File = fdFile
e.files[fd] = fdFile
- fmt.Println("DEBUG AFTER", fdFile.FlagsString())
case syscall.F_DUPFD:
fmt.Println("TODO: F_DUPFD with fcntl not yet implememented")
case syscall.F_DUPFD_CLOEXEC: