LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-12-2009, 01:19 PM   #1
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Relationship between ASCII control codes and Process Signals


Hello,

Say you are running bash and are managing jobs with Ctrl Z, Ctrl D, Ctrl |, etc., or send a backspace as Ctrl H, etc. etc. These are ASCII control codes in the 0 - 31 range that bash picks up.

My question: Are these mapped directly to standard POSIX process signals like SIGKILL, SIGTERM, etc? If so, is there a comprehensive listing some place of how each ASCII control character correlates to the corresponding POSIX process signal?

Stated another way, are ASCII control codes in bash more or less "hotkeys" for various signals you could send to PIDS via kill?

Any illuminating information would be appreciated -- I understand the signals and the codes, just not how they relate to eachother.

Thanks,
Jameson
 
Old 06-12-2009, 02:48 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
No - the mapping is done per terminal session though of course there are defaults.

You can run "stty -a" to see a lot of these.

Other capabilities are related to terminfo. If you do "echo $TERM" you'll see your session has a defined terminal type (often xterm or vt100 for most things these days since you're usually emulating a physical terminal - in the old days you were usually on a physical serial terminal of one sort or another). You can dump the terminfo information with the infocmp command. (e.g. infocmp xterm).

For most commands there are man(ual) pages that can be accessed by typing man <command> (e.g. man infocmp, man stty). Also for many configuration files there are man pages (e.g. man terminfo).
 
Old 06-12-2009, 03:51 PM   #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
Only Control-C, Control-\ and Control-Z (and perhaps a couple more) are related to signals. The other control characters are used to send instructions to the terminal driver, like ringing a bell, tab, backspace, newline, end-of-file, suspend/resume output, page-feed, escape and the likes but this isn't done by sending signals which would be overkill.

Last edited by jlliagre; 06-12-2009 at 03:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ascII and uf-8 codes incompatibility linuxamateur-two-too Linux - Networking 0 12-21-2005 08:05 PM
extended ascii codes in c++ crAckZ Programming 1 09-12-2005 04:04 PM
RH9 - ASCII codes using alt-gr ? manub Red Hat 0 03-14-2004 04:24 AM
alt-gr ASCII codes don't work ? manub Linux - Newbie 0 03-13-2004 06:05 PM
ASCII Codes in linux slackmagic Linux - Newbie 2 12-22-2003 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:50 PM.

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