Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
signals: fix signal name debug print
Here's how it looks now: $ runc --debug exec ctid sleep 1h ... DEBU[0000]signals.go:102 main.(*signalHandler).forward() sending signal to process urgent I/O condition DEBU[0000]signals.go:102 main.(*signalHandler).forward() sending signal to process urgent I/O condition DEBU[0022]signals.go:102 main.(*signalHandler).forward() sending signal to process terminated DEBU[0022]signals.go:102 main.(*signalHandler).forward() sending signal to process urgent I/O condition This is obviously not very readable. Use unix.SignalName, plus a numeric representation of the signal, since SignalName does not know all signals. Add PID while we're at it. With this commit: DEBU[0000]signals.go:103 main.(*signalHandler).forward() forwarding signal 23 (SIGURG) to 891345 DEBU[0020]signals.go:103 main.(*signalHandler).forward() forwarding signal 45 () to 891345 DEBU[0020]signals.go:103 main.(*signalHandler).forward() forwarding signal 23 (SIGURG) to 891345 DEBU[0020]signals.go:103 main.(*signalHandler).forward() forwarding signal 23 (SIGURG) to 891345 Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information