Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: application crash during WINCH Signal

by hanspr (Sexton)
on Nov 29, 2019 at 20:33 UTC ( [id://11109450]=note: print w/replies, xml ) Need Help??


in reply to application crash during WINCH Signal

For documentation porpoises and to help a future troubled soul with a similar ugly bug. This is the walk around I used to handle the problem.

I still think there is something buggy in xubuntu, that causes the WINCH signals to pile up if they come too quick one after another, so I had to introduce a mechanism to process one by one and give it enough time to each process to finish

#$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; #}; sub winch { $SIG{'WINCH'} = undef; select(undef, undef, undef, 0.2); while (!$EXP->slave) { select(undef, undef, undef, 0.1); }; $EXP->slave->clone_winsize_from(\*STDIN); kill 'WINCH'=>$EXP->pid if $EXP->pid; $SIG{'WINCH'} = \&winch; return 1; } $SIG{'WINCH'} = \&winch;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-19 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found