#3972·crush

kill never reaches the external binary

Author: vitolee-1018Created Sep 28, 2026Updated Sep 28, 2026

What happened

mvdan.cc/sh v3.14 lists kill as a shell builtin. The builtin switch has no kill case, so it returns unsupported builtin and exits 2. The exec handler never runs, and the kill binary on PATH is never used.

A block rule for kill also never sees the command, for the same reason.

kill -l reproduces it: stderr is kill: unsupported builtin, exit status 2.

User impact

kill 1234 and kill -l in a Crush shell fail with kill: unsupported builtin and exit status 2. The signal is never sent, so a job started from the bash tool or a hook cannot be stopped with kill.

The system kill, such as /bin/kill, is on PATH. It is never reached because mvdan/sh#1401 makes interp treat kill as a builtin and then leave it unimplemented.

Fix

A call handler rewrites a bare kill to the absolute path found from the shell PATH, after the block list is applied to the original name. If no external kill exists, the name is left unchanged.

kill $! still cannot work, because the interpreter does not track background job pids.

Tests

TestKillUsesExternalBinary and TestBlockedKillDoesNotRun failed before the change and pass after.