DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th June 2008
malindang malindang is offline
New User
 
Join Date: Jun 2008
Posts: 1
Default disabling ctrl-c

Hello,

I have a shell script that I dont want to be interrupted with a ctrl-c or ctrl-z command while running. Any idea how to do this?

Thanks
Edit/Delete Message
Reply With Quote
  #2   (View Single Post)  
Old 26th June 2008
ninjatux's Avatar
ninjatux ninjatux is offline
Real Name: Baqir Majlisi
Spam Deminer
 
Join Date: May 2008
Location: Antarctica
Posts: 293
Default

I'm not sure if you can. I'd imagine there's a way to use custom keybindings and not define that at all, but that's just a theory.
__________________
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity."
MacBook Pro (Darwin 9), iMac (Darwin 9), iPod Touch (Darwin 9), Dell Optiplex GX620 (FreeBSD 7.1-STABLE)
Reply With Quote
  #3   (View Single Post)  
Old 26th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Use trap, see http://docs.hp.com/en/B2355-90046/ch23s07.html

See kill(1) for a list of signals.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #4   (View Single Post)  
Old 27th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

A more extended guide I happened to come across:
http://tldp.org/LDP/Bash-Beginners-G...l/chap_12.html

And an example:
http://tldp.org/LDP/abs/html/debugging.html#EX76
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable CTRL+ALT+DEL FreeBSD Gnome mfaridi FreeBSD Security 7 27th August 2008 07:10 PM
Ctrl-D and Ctrl-C sometimes dose not work mfaridi FreeBSD General 9 6th July 2008 07:04 AM
Spin locks and interrupts disabling n4uti1us FreeBSD General 5 20th May 2008 01:51 PM


All times are GMT. The time now is 02:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick