I'm currently solving umount /chrootedpath /dev/pts after several chroot(s): target is busy.
I've found part of the problem - two processes still running ps
had shown as sudo choot
command. They were in Ss
/ T
status. Strangely kill -9
exited with 1
, I was puzzled cause I know uninterruptable sleep
fails to be killed, not others. So I've tried to run with strace
to find out more. But this time it exited with 0. For both processes first failed, one with strace
succeeded.
A bit later I used lsof
to find several more processes, for them both kill -9
and with strace
failed. But soon after they disappeared.
Web search found posts about sending SIGINT, also Why doesn't SIGKILL terminate a stopped program (yes)? where there is comment
SIGKILL, unlike other signals, is not blocked for suspended processes. Sending the KILL signal to a suspended process kills it — asynchronously, but in practice basically immediately. – Gilles 'SO- stop being evil' Jun 12, 2015 at 22:30
Maybe "asynchronously", but second kill -9
succeeded, AFAIK it fails if the process no longer there. And if "asynchronously", what is expected exit status of the first command? Can somebody please explain what happened and why?