Fixing the INT/TERM trap and a stop method