Debian – Ctrl-C does not work with pppd non-detached session

debianlinuxpppterminaltmux

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.

Best Answer

Have you ever thought about givin GNU screen a try? To be very honest i havent much experience with tmux, but screen always did the job nicely.

Related Question