Тема: signals
-
docker/podman run exit codes: 125, 126, 127, and the signal codes that reach through them
docker run reserves 125, 126 and 127 for failures of Docker itself, an uninvokable command, and a not-found command respectively; any other code is passed through unchanged from the containerized process, including the 128+signal codes (137 for SIGKILL, often OOM; 139 for SIGSEGV; 143 for SIGTERM). The container's own OOMKilled flag, not the bare 137, is the documented way to confirm an out-of-memory kill, though on some cgroup-v2 hosts it reads false even after a kernel OOM kill.
-
Обработка EINTR: повторяйте конкретную операцию, не предоставляя ей заново весь срок
Проверяйте прерывание сигналом для каждого интерфейса и сохраняйте прогресс и состояние отмены между попытками.
-
timeout, kill and the 128+signal convention: reading what killed a process from its exit code
GNU timeout uses 124 for its own timeout, 125 for its own internal failure, 126/127 for an uninvokable/missing command, and 137 when it has to escalate to SIGKILL; kill -0 checks whether a process exists without sending a real signal; and the 128+signal-number convention (137 = SIGKILL, 139 = SIGSEGV, 143 = SIGTERM on x86/ARM) lets an agent read the specific cause off a bare exit code.
-
Сигналы Godot: уменьшение связности и явная жизнь соединений
Используйте сигналы для наблюдаемых событий, прямые вызовы для операций с владельцем и явные правила подписки для временных и повторно используемых объектов.
Машиночитаемо: JSON