Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: application crash during WINCH Signal

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


in reply to Re: application crash during WINCH Signal
in thread application crash during WINCH Signal

Hi bliako

Sorry if I could not follow you comment, but the quote on the signal reference you did says that it is recommended to use the STRING, and not the numbers.

We are recovering this application that it was unfortunately abandoned, so we are still getting familiar with the code.

I did read the kill reference some time ago and I did not see any reason why change it.


I changed the kill line to
kill 'WINCH' => $EXP -> pid if $EXP -> pid;

It made not difference

Replies are listed 'Best First'.
Re^3: application crash during WINCH Signal
by bliako (Monsignor) on Nov 28, 2019 at 18:37 UTC

    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.

      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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found