summaryrefslogtreecommitdiffstats
path: root/src/deal.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/deal.go')
-rw-r--r--src/deal.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/deal.go b/src/deal.go
index 56f6d1d..aaac8c5 100644
--- a/src/deal.go
+++ b/src/deal.go
@@ -4,7 +4,6 @@ import (
4 "fmt" 4 "fmt"
5 "sync" 5 "sync"
6 "syscall" 6 "syscall"
7 "time"
8 7
9 "go.mongodb.org/mongo-driver/bson" 8 "go.mongodb.org/mongo-driver/bson"
10) 9)
@@ -62,7 +61,7 @@ func deal() {
62 case EXECVE: 61 case EXECVE:
63 dealExecve(cooked) 62 dealExecve(cooked)
64 case PIDEXIT: 63 case PIDEXIT:
65 go deletePid(cooked) 64 deletePid(cooked)
66 case FILEOPEN: 65 case FILEOPEN:
67 fileOpen(cooked) 66 fileOpen(cooked)
68 case FILEWRITE: 67 case FILEWRITE:
@@ -74,7 +73,7 @@ func deal() {
74} 73}
75 74
76func deletePid(cooked Event) { 75func deletePid(cooked Event) {
77 time.Sleep(1 * time.Second) 76 // time.Sleep(1 * time.Second)
78 mongoMutex.Lock() 77 mongoMutex.Lock()
79 // 先从老爹那里销户 78 // 先从老爹那里销户
80 pidCol.UpdateOne(bson.M{"pid": cooked.ppid}, bson.M{ 79 pidCol.UpdateOne(bson.M{"pid": cooked.ppid}, bson.M{