fix: procmon message for removal from tracking followed by kill

This commit is contained in:
gmega 2025-06-19 20:52:08 -03:00
parent a7d12ba1ff
commit 9fcc15f79b
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18

View File

@ -37,9 +37,14 @@ pm_start() {
fi
exit_code=$(cat "${_pm_output}/${pid}.pid")
# If the cat fails, this means the file was deleted. This will typically
# only happen this way if the process was removed from tracking and then
# killed right after.
#
# shellcheck disable=SC2181
if [ $? -ne 0 ]; then
echoerr "[procmon] ${pid} died with unknown exit code. Aborting."
_pm_halt "halted_no_return"
echoerr "[procmon] ${pid} file vanished (removed from tracking?)"
continue
fi
if [ -z "$exit_code" ]; then