bash trap

 

 


# ignore SIGHUP

trap '' SIGHUP

# redirect STDIN, STDOUT, STDERR

exec 0< '/dev/null'
exec 1> '/dev/null'
exec 2> '/dev/null'