Add registers a new child process
(child *ChildProcess)
| 39 | |
| 40 | // Add registers a new child process |
| 41 | func (ct *ChildTracker) Add(child *ChildProcess) { |
| 42 | ct.mu.Lock() |
| 43 | defer ct.mu.Unlock() |
| 44 | ct.children[child.PID] = child |
| 45 | slog.Debug("Child process registered", "pid", child.PID, "username", child.Username, "remote_addr", child.RemoteAddr) |
| 46 | } |
| 47 | |
| 48 | // Remove unregisters a child process by PID |
| 49 | func (ct *ChildTracker) Remove(pid int) *ChildProcess { |
no outgoing calls