Field guide to command line failures · reference only, nothing hosted here
CliHelper

ETXTBSY when replacing a running binary.

Text file busy

ETXTBSY on a running binary

The kernel refuses to write over a file that is currently mapped as executable.

Why copying to a temporary name works

cp ./service /tmp/service.new && mv /tmp/service.new ./service

mv within a filesystem replaces the directory entry, leaving the running process on the old inode.

Check the busy file

lsof /usr/local/bin/service

A library rather than a binary

The same error appears when replacing a shared object. Update during a restart window or use the atomic rename.

Scope: failure mode: ETXTBSY when replacing a running binary.

CliHelper documents failure modes of third-party command line tools. No software is stored or distributed here.

Terms Privacy Contact support@clihelper.pro