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

Why is morse(1) not responding to CTRL {c,z,\} ?



Hi,

Below is the text that I originally sent to comp.unix.shell, thinking it
was a bash bug, but I now think it is a possible morse(1)bug. Full
thread is here:
https://groups.google.com/g/comp.unix.shell/c/oemW2wn-Lvw

I just want to add that this happens on Buster, but it didn't happen on
Stretch.

Any more details, please ask.


-------- Forwarded Message --------
From: Ottavio Caruso
Newsgroups: comp.unix.shell
Subject: Bash: Why is a particular program not responding to CTRL {c,z,\} ?
Date: Sat, 27 Mar 2021 07:48:23 +0000


Hi,

I periodically run a command, for example:

$ gen_text1 "cb?dw4lh+8@px,1y-" 186 | morse  -f `echo $RANDOM % 400 +
500 | bc`  -ecTsB -w 15 -n 19

where:

$ type gen_text1
gen_text1 is a function
gen_text1 ()
{
     tr -dc "$1" < /dev/urandom | fold -w 1 | head -n "$2" | paste -sd
'\0' -
}

$ whatis morse
morse (1)            - Morse-code trainer and QSO generator for aspiring
radio hams

Since moving from Debian Stretch to Debian Buster (home partition is the
same, so all dot files are unchanged), and consequently from bash v4 to
bash v5, I can't manage to "sigkill" this program from the terminal;
example:

$ gen_text1 "cb?dw4lh+8@px,1y-" 186 | morse  -f `echo $RANDOM % 400 +
500 | bc`  -ecTsB -w 15 -n 19
^C^C^C^C^C^C^C^C
^Z^Z^Z^Z^Z^Z^Z^Z^Z
^\^\^\^\^\^\^\^\^\


The only solution is to open another terminal and run "killall -9 morse".

This is what the program looks like from the other terminal before being
killed:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
oc       25446  0.7  0.1 439780  5080 pts/1    Sl+  07:39   0:00 morse
-f 547 -ecTsB -w 15 -n 19


I am not sure if I am doing anything wrong or something has changed from
bash v4 to bash v5. It's not the end of the world but it's annoying.

Any input will be appreciated.

--
Ottavio Caruso


Reply to: