Garayed.com  

Go Back   Garayed.com > Linux
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-23-2007, 04:59 PM
Rainer Sennwitz
 
Posts: n/a
Default SIGWINCH not being delivered to application with bash

Hello,

since some time I have the problem that on some machines that programs
(f.i. irssi) do not resize when I change the terminal size. At first I had
the idea that this has something to do with the shopt checkwinsize but
if I understood the manpage correctly this is only to set COLUMNS and
LINES if necessary. I don't know wether the problem only exists over ssh
because this host has no X so I cannot try locally. It already occoured
on debian sarge on this maschine and it disappeard after upgrading to
etch. But not it's the same as before (still etch).

Here is a small perl script which I wrote to see wether the application
receives a SIGWINCH.

andariel [~]> cat /tmp/sigw.pl
#!/usr/bin/perl -w

sub got_sig {
print "Got a signal!\n";
}

$SIG{WINCH} = \&got_sig;

while (1) {
sleep (1);
}


The result is rather confusing for me. As I expected sigw.pl does not get
a WINCH signal but only with bash. When executing a csh it works and also
after executing a bash again.


andariel [~]> /tmp/sigw.pl
<<< Resizing terminal, nothing happens >>>


andariel [~]> exec csh
andariel:~> /tmp/sigw.pl
<<< Resizing terminal with csh>>>
Got a signal!

andariel:~> exec bash
andariel [~]> /tmp/sigw.pl
<<< Resizing terminal with bash again >>>
Got a signal!

andariel [~]>


Can anyone give me a hint why it behaves like that? These are the things
I already tried but none of them did help:
- trying another terminal (xterm, Eterm instead of aterm)
- using a friends pc (and account) to make sure that the problem is not
on my local environment.
- logging in with a new user account with default settings
- compiling the latest bash from http://www.gnu.org/software/bash/
- downgrading the bash to the debian package which was installed right
after the etch update.
- setting checkwinsize by hand in all involved shells

The same problem occures on another box with debian sarge.

Here some details of my currently installed bash (official debian
package):

andariel [~]> echo $BASH_VERSION
3.1.17(1)-release
andariel [~]> cat /etc/debian_version
4.0
andariel [~]> apt-cache policy bash
bash:
Installed: 3.1dfsg-8
Candidate: 3.1dfsg-8
Version table:
*** 3.1dfsg-8 0
500 http://debian.informatik.uni-erlangen.de etch/main Packages
100 /var/lib/dpkg/status
andariel [~]>

If you have any ideas what causes this behavior or if you just need some
more information concering my system or environment which might help to
solve this problem please let my know.

Thanks in advance,
Rainer


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:09 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.