################ this is one file, which would be /etc/init.d/rc ######################## #!/bin/bash on_exit() { echo "error: catched a sigint." exit 1; } trap on_exit SIGINT . ./test ############# and this is the one that simulates a process which doesn't want to start at boot time #!/bin/bash while : ; do sleep 1; done