Problems with resizing terminal I have a recurring problem with the Mac terminal.


Start terminal
mysql
Ctrl + Z
mysql
Resize the width of the window
Ctrl + Z
fg 1 (switch back to first mysql)
Type some text that reaches the end of the line


PROBLEM: Mysql seems to still think the window has the original width, so when the text you type reaches the right hand side of the terminal window, the text starts jumping around like crazy as you type, because it is not repositioned correctly.

WORKAROUND: If I change the size of the window just one character, the problem is solved, but it is annoying having to do this several times per day.

I thought of possible things that could be wrong:


Bug in MySQL/MariaDB
Bug in Terminal
Wrong Terminal settings
Wrong Bash settings


Anyone have a solution to the problem, or know who is most likely the culprit, so I know where to direct a bug report?
I think this happens because the window resize signals are sent while the app is suspended, so it won't receive them. One way to fix it may be to manually send the SIGWINCH signal to the process while it is in the foreground. From another terminal, run:

killall -WINCH mysql