Trap signal SIGXFSZ not working when using ulimit -f

143 views Asked by At

Trying to trap signal SIGXFSZ when applying ulimit -f in script my attempts:

script:
#! /bin/bash
function catch_SIGXFSZ {
    echo "caught!!" 
}

echo running
ulimit -f 1

trap catch_SIGXFSZ 25

cat bigtmp.log > tmp.log

echo after

after running i get:

./try.sh
running
File size limit exceeded
after

any idea why the trap isn't working? thanks for the help!

0

There are 0 answers