[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CTRL-C Doesn't work??!! ....



On Fri, Dec 31, 1999 at 06:28:53PM +0000, Kevin Traas wrote:
> Greetings,

<snip>

> Any ideas would be ***greatly*** appreciated.
> 
> i.e. What manages Job Control in a Linux system?  The kernel?  The
> shell?  Init?  (I've rolled my own init, btw.)  And, why might Job
> Control be disabled?
> 
> ....  TIA for your help/comments.
> 
> Regards,
> Kevin Traas

My understanding is that the job control is done by the shell.
You can have multiple processes controlled from the same terminal,
and the job control deals with deciding which of those processes 
has access to the terminal device, and tells you when the status of
jobs under the control of the terminal changes.  That's why when you 
have backgrounded a process and it tries to write to the terminal,
the job controller tells you that the process is now stopped
waiting for tty output, and won't restart until you give it
the terminal by foregrounding it.  Look in the bash man page for
more details.

Ctrl-C normally sends a SIGINT signal to the process running in the 
foreground.  This normally terminates the process.  I would think
that either your terminal is not set up to map Ctrl-C onto SIGINT,
or the program you are trying to interrupt is ignoring the SIGINT.

-------------------------------------------------------------------------
funkiest:~$ stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 0; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe -echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
--------------------------------------------------------------------------

Note the second line contains "intr = ^C", check your settings contain this.
If not, I think "stty intr ^C" should add it.

You can check if the program is ignoring SIGINTs by sending the signal
manually with kill "kill -SIGINT <pid>".

HTH.

-- 
Regards,
Paul


Reply to: