I have a Mini2440 ARM Board, and I have put a base Debian 6.0 system on it using multistrap.
I have used tmux to run several processes in defferent windows from /etc/rc.local. I connect to the board using its serial port and an inittab entry to run getty on that port. I use picocom as serial communicator.
When root logs in, ~/.bashrc attaches him to the already running tmux server, and processes can be easily monitored. the actual command is exec tmux attach-session -t "main". tmux runs with default config.
Everything works, except one of the processes (a shell script around pppd) does not receive Ctrlc from terminal, while other processes do. Also Ctrl\ works. also kill -INT <pppd_pid> works, but kill -INT <shellscript_pid> does not.
I really need Ctrlc to work. What is wrong with this setup?
Edit:
here is the output of stty -a in the shell script, right before pppd:
speed 38400 baud; rows 23; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany imaxbel -iutf8
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
since it's just pppd process that has this issue, I think it has something to do with it or its configuration, but when I run pppd outside of tmux, Ctrl-C works. pppd runs with nodetach option, so it stays in terminal foreground.
I also tested it on my dev machine (debian 6.0 on amd64) with the same results.
stty -ashowintr = ^C? If not, what is theintrsetting? (Note:stty -a | grep intrwon't work, since it makessttywrite to a pipe rather than to your tty.) Does Ctrl-V Ctrl-C echo^C? If not, what does it echo? – Keith Thompson Oct 6 '12 at 18:32^and Ctrl-C adds aCto it. – aalizadeh Oct 7 '12 at 8:51trapcommand in the shell script? – Keith Thompson Oct 8 '12 at 23:19pppdhas no say in what its underlying shell decides to do with a direct SIGINT. Try writing a tiny shell script that invokes /bin/sleep 600 and send the shell process a SIGINT, you'll see the exact same thing. – Andrew B Jan 6 at 21:43