summaryrefslogtreecommitdiffstats
path: root/src/global.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/global.go')
-rw-r--r--src/global.go23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/global.go b/src/global.go
index 4e08866..0439df6 100644
--- a/src/global.go
+++ b/src/global.go
@@ -1,6 +1,27 @@
1package main 1package main
2 2
3import "sync" 3import (
4 "sync"
5 "time"
6)
7
8type Event struct {
9 timestamp time.Time
10 pid, ppid int
11 syscall int
12 argc int
13 argv []string
14 cwd string
15}
16
17type process struct {
18 timestamp time.Time
19 pid, ppid int
20 argv []string
21 cwd string
22 rootfs string
23 children []int
24}
4 25
5var pids sync.Map // 古希腊掌管进程的神,int->*process 26var pids sync.Map // 古希腊掌管进程的神,int->*process
6var wg sync.WaitGroup // 掌管协程 27var wg sync.WaitGroup // 掌管协程