Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: application crash during WINCH Signal

by hanspr (Sexton)
on Nov 28, 2019 at 19:24 UTC ( [id://11109387]=note: print w/replies, xml ) Need Help??


in reply to application crash during WINCH Signal

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?

Replies are listed 'Best First'.
Re^2: application crash during WINCH Signal
by bliako (Monsignor) on Nov 28, 2019 at 20:53 UTC
    The kill line, what it does is stop the WINCH event from being called again be the same event, right?

    kill WINCH => $EXP -> pid if $EXP -> pid; sends the WINCH signal to the process with pid $EXP->pid. Where $EXP is an Expect object (i guess). The bottom line is that kill is sending a specified signal to a specified process. It does not stop or block a signal.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11109387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-25 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found