Jan 21, 2004 #1 redsydus Programmer Nov 21, 2003 23 FR HI all, How can I disable 'ctrl c' sequence when a script is runing ? Thks in advance for your replies !! bye
HI all, How can I disable 'ctrl c' sequence when a script is runing ? Thks in advance for your replies !! bye
Jan 21, 2004 #2 roylec MIS Sep 16, 2002 31 GB The ^C command sends an Interrupt signal (2) to the running process. Use the trap command to ignore this signal: trap "" 2 Loosely, this command means: when you receive a signal 2, do nothing ("" Use 'man trap' to find out more about this command Upvote 0 Downvote
The ^C command sends an Interrupt signal (2) to the running process. Use the trap command to ignore this signal: trap "" 2 Loosely, this command means: when you receive a signal 2, do nothing ("" Use 'man trap' to find out more about this command
Jan 21, 2004 #3 SteveR77 Programmer Sep 18, 2000 813 US In csh you can do this replacing the ls command with your script - #!/bin/csh -f onintr int echo "trapping interrupt for ls -l" ls -l int: echo "ls -l interrupted" exit 1 Steve Upvote 0 Downvote
In csh you can do this replacing the ls command with your script - #!/bin/csh -f onintr int echo "trapping interrupt for ls -l" ls -l int: echo "ls -l interrupted" exit 1 Steve
Jan 21, 2004 #4 theotyflos Programmer Oct 15, 2000 132 GR If you 're on SCO, you can: Code: stty intr '^-' # single quote, caret, minus, single quote Theophilos. ----------- There are only 10 kinds of people: Those who understand binary and those who don't. Upvote 0 Downvote
If you 're on SCO, you can: Code: stty intr '^-' # single quote, caret, minus, single quote Theophilos. ----------- There are only 10 kinds of people: Those who understand binary and those who don't.