bash timeout sometimes doesn't work with partprobe, not even when I send the SIGKILL signal
Andrew Henderson
When I run any of these three commands:
timeout 15s partprobe /dev/sdaor:
timeout -k 5s 15s partprobe /dev/sdaor:
timeout -s SIGKILL 15s partprobe /dev/sdapartprobe is not interrupted.
I can simulate this thing like this:
- I write data to disk without waiting for the buffer to be flushed before running the
udisksctlcommand. - I run the command
udisksctl unmount -b /dev/sda2but I interrupt it with ^C before its term (because it lasts a long time). - I execute one of the three commands above and the
timeoutcommand does not interruptpartprobewithin 15 seconds (or 20 seconds maximum in the second command), not even with the SIGKILL signal.
Why?
P. S. I obviously know that this is a maneuver that can damage the USB device but it is to test the effectiveness of the timeout command (as I see it is not always effective).
Reset to default