I\'m trying to catch the SIGUSR1 signal in a bash script that is sleeping via the sleep command:
SIGUSR1
sleep
#!/bin/bash trap \'echo \"Caught
Remark that
sleep infinity & wait
puts the sleep in background, and stops the wait with the signal. This leaves an infinite sleep behind on every signal !
Replace the sleep and wait with
read
and you will be fine.