|
|
|
@ -45,7 +45,8 @@ func main() { |
|
|
|
|
|
|
|
|
|
|
|
// non-posix
|
|
|
|
// non-posix
|
|
|
|
pid := flag.Int("pid", -1, "$PID") |
|
|
|
pid := flag.Int("pid", -1, "$PID") |
|
|
|
sessionPid := flag.Int("sessionPid", -1, "$$") |
|
|
|
shellPid := flag.Int("shellPid", -1, |
|
|
|
|
|
|
|
"$$ (pid but subshells don't affect it)") |
|
|
|
windowId := flag.Int("windowId", -1, "$WINDOWID - session id") |
|
|
|
windowId := flag.Int("windowId", -1, "$WINDOWID - session id") |
|
|
|
shlvl := flag.Int("shlvl", -1, "$SHLVL") |
|
|
|
shlvl := flag.Int("shlvl", -1, "$SHLVL") |
|
|
|
|
|
|
|
|
|
|
|
@ -104,14 +105,14 @@ func main() { |
|
|
|
Term: *term, |
|
|
|
Term: *term, |
|
|
|
|
|
|
|
|
|
|
|
// non-posix
|
|
|
|
// non-posix
|
|
|
|
Pid: *pid, |
|
|
|
Pid: *pid, |
|
|
|
SessionPid: *sessionPid, |
|
|
|
ShellPid: *shellPid, |
|
|
|
WindowId: *windowId, |
|
|
|
WindowId: *windowId, |
|
|
|
Host: *host, |
|
|
|
Host: *host, |
|
|
|
Hosttype: *hosttype, |
|
|
|
Hosttype: *hosttype, |
|
|
|
Ostype: *ostype, |
|
|
|
Ostype: *ostype, |
|
|
|
Machtype: *machtype, |
|
|
|
Machtype: *machtype, |
|
|
|
Shlvl: *shlvl, |
|
|
|
Shlvl: *shlvl, |
|
|
|
|
|
|
|
|
|
|
|
// before after
|
|
|
|
// before after
|
|
|
|
TimezoneBefore: *timezoneBefore, |
|
|
|
TimezoneBefore: *timezoneBefore, |
|
|
|
@ -127,7 +128,7 @@ func main() { |
|
|
|
RealtimeSinceBoot: realtimeSinceBoot, |
|
|
|
RealtimeSinceBoot: realtimeSinceBoot, |
|
|
|
|
|
|
|
|
|
|
|
GitWorkTree: getGitDir(), |
|
|
|
GitWorkTree: getGitDir(), |
|
|
|
MachineId: getMachineId(), |
|
|
|
MachineId: getMachineId(), |
|
|
|
} |
|
|
|
} |
|
|
|
sendRecord(rec, strconv.Itoa(config.Port)) |
|
|
|
sendRecord(rec, strconv.Itoa(config.Port)) |
|
|
|
} |
|
|
|
} |
|
|
|
|