Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

bash timeout sometimes doesn't work with partprobe, not even when I send the SIGKILL signal

Writer Andrew Henderson

When I run any of these three commands:

timeout 15s partprobe /dev/sda

or:

timeout -k 5s 15s partprobe /dev/sda

or:

timeout -s SIGKILL 15s partprobe /dev/sda

partprobe is not interrupted.
I can simulate this thing like this:

  1. I write data to disk without waiting for the buffer to be flushed before running the udisksctl command.
  2. I run the command udisksctl unmount -b /dev/sda2 but I interrupt it with ^C before its term (because it lasts a long time).
  3. I execute one of the three commands above and the timeout command does not interrupt partprobe within 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

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy