bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: random crashes when read interrupted by signal & clean up modifies t


From: Chet Ramey
Subject: Re: random crashes when read interrupted by signal & clean up modifies terminal
Date: Sun, 10 Feb 2013 15:03:39 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/8/13 6:09 PM, Mike Frysinger wrote:

> it does not crash, however the devel branch appears to be misbehaving, so i'm 
> not sure the test is valid
> 
> with bash-4.2_p42, if i run:
>       read -t0.013 -n1
> it returns pretty quickly
> 
> with the devel branch though, it often times does not return automatically.  
> it's as if the -t option were not specified.

Yes, the issue is the result of bash longjmping out of a signal handler
without restoring the signal mask (and unblocking SIGALRM).  If you
run that command in a loop, it blocks reading for input (because SIGALRM
is blocked) about every other time.

I reworked that signal handling and integrated it more into the mechanisms
the rest of the shell uses.  Those fixes will be in the next devel snapshot
and the next release.

Chet

- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlEX/QcACgkQu1hp8GTqdKuSnQCcCl49aQL5xtZnlL1aZXY/iSbK
MR4AoJl0OJbkqhMZidIIsM0Ioi3OpPx+
=2WUI
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]