$SIG{INT} = \&blah; sub blah { sleep 10; exit; } while (1) { system("rsync -a rsync://blah.example.com/foo foo"); sleep 5; }