LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-09-2006, 10:36 AM   #1
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Rep: Reputation: 46
in bash does control-c = SIGINT or SIGTERM?


That's all I need to know. Thanx.
 
Old 05-09-2006, 10:58 AM   #2
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
It has nothing to do with bash. The terminal driver (or xterm/etc) interprets one key as an interrupt key and sends an interrupt signal (SIGINT) to the foreground process (the session leader). You can change the key used for this with stty. The default happens to be control-c.
 
Old 05-09-2006, 11:01 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
This is not releated to bash, but to the underlying tty driver.
Usually, <ctrl>-C is SIGINT but you can change that to any other character with the stty command.
SIGTERM is not linked to an interrupt character but is just the signal sent by default by the kill command.

Last edited by jlliagre; 05-09-2006 at 11:02 AM. Reason: ioerror was faster ;)
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
SIGINT problem brentos Linux - General 1 12-17-2008 10:43 PM
Does a process goes back to same location after handling SIGTERM ? murugesan Programming 6 09-13-2005 07:44 AM
Linux - Bash - Trap SIGTERM bigdogdan2 Programming 13 07-20-2004 10:54 AM
nagios sigterm dallasnewbie Linux - Networking 1 05-28-2003 10:32 AM
httpd error_log SIGTERM, shutting down mnauta Linux - Security 2 05-02-2003 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration