{ local @SIG{'INT', 'TERM'} = (sub {warn 'Interrupt!'}) x 2; `$cmd -P ALL $interval >> $path`; } # rest of the code in the module which Creates ... files