I was merely saying that using a signal name, e.g. kill "WINCH" => $pid is the most straight-forward way to specify a signal. I am not sure if using constant WINCH (like your code is doing) is as safe. That's why I mentioned it. At least you don't use numbers e.g. kill 10 => $pid which is obviously wrong non-portable.
Your handler propagates the WINCH signal further down all the way to the shell. In your handler you can at least monitor the pids sent the WINCH and see which one crashes. Is it perl? Is it bash? Is it ssh?
I have put the link about a WINCH-related crash in the post above.
| [reply] [d/l] [select] |
I have monitored the pid with strace, or think I did, as in the first post. It is a bash shell, but I it happens with : bash, ssh, zsh.
But essentialy is bash because the ssh connections are lunched using bash too.
If I comment the complete WINCH routine, like this
#$SIG{'WINCH'} = sub {
# if (!$CONNECTED) {
# return 1;
# }
# while (!$EXP->slave) {
# #select(undef, undef, undef, 0.1);
# };
# $EXP->slave->clone_winsize_from(\*STDIN);
# kill 'WINCH' => $EXP -> pid if $EXP -> pid;
# return 1;
#};
It will not get disconnected, but the terminal will not be aware of the window size change
So, is in did something related to the propagation of the winch signal.
| [reply] [d/l] |