mirror of
https://github.com/hackerschoice/segfault.git
synced 2024-06-28 17:51:22 +00:00
ingore init.pid
This commit is contained in:
parent
76fb9ba82b
commit
c681f55ee0
@ -28,6 +28,7 @@ lgwall()
|
||||
[[ -z $2 ]] && { echo >&2 "lgwall LID [message]"; return; }
|
||||
cid=$(docker inspect --format='{{.Id}}' "$1") || return
|
||||
for fn in "/var/run/containerd/io.containerd.runtime.v2.task/moby/${cid}/"*.pid; do
|
||||
[[ $fn == *"init.pid" ]] && continue
|
||||
pid=$(cat "$fn") || continue
|
||||
[[ $(readlink "/proc/${pid}/fd/2") != "/dev/pts/"* ]] && continue
|
||||
echo -e "$2" >"/proc/${pid}/fd/2"
|
||||
|
Loading…
Reference in New Issue
Block a user