I hope this information additional information helps to solve the problem:
I commented the code like this.
$SIG{'WINCH'} = sub {
# if (!$CONNECTED) {
# return 1;
# }
# while (! $EXP -> slave) {
# select(undef, undef, undef, 0.25);
# };
# $EXP -> slave -> clone_winsize_from(\*STDIN);
kill WINCH => $EXP -> pid if $EXP -> pid;
};
Then, followed the next steps
- Open e local bash terminal
- type : trap 'stty size' winch <enter>
- Type enter, enter, enter, ... until I arrive to the last line
- Then the terminal fills with:
test@test-VirtualBox:~$trap 'stty size' winch
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
test@test-VirtualBox:~$ 24 85
<-= DISCONNECTED (PRESS <ENTER> TO RECONNECT) (Thu Nov 28 13:14:40 20
+19)
And then stops
Looks like it enters into an infinite loop. This behaviour is not seen in any other desktop, environment.
In other desktop environments you see:
hans@hans-desktop:~$ trap 'stty size' winch
hans@hans-desktop:~$
hans@hans-desktop:~$
hans@hans-desktop:~$
hans@hans-desktop:~$
hans@hans-desktop:~$
hans@hans-desktop:~$
The winch signal is never called when you arrive to the end, only on a window resize.
It would be help full for me to see if I understand the code correctly
$SIG{'WINCH'} = sub {
kill WINCH => $EXP -> pid if $EXP -> pid;
};
The kill line, what it does is stop the WINCH event from being called again be the same event, right?
Could it be that in xubuntu is not being sent and then the signal keeps arriving until there is a stack overflow or something similar?