[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] readline() in 7.0 seems to interfere with blocked SIGALRM
From: |
Frédéric Brière |
Subject: |
[Bug-readline] readline() in 7.0 seems to interfere with blocked SIGALRM |
Date: |
Fri, 20 Jan 2017 13:07:24 -0500 |
User-agent: |
NeoMutt/20161126 (1.7.1) |
[ I don't have much experience with either readline or signals, so ]
[ please forgive any ignorance (or stupidity) on my part. :) ]
readline 7.0 is causing a bug[*] in Twinkle, where we are normally
blocking SIGALRM in all threads, with one thread dedicated to calling
sigwait(). Upon calling readline(), SIGALRM now apparently becomes
unblocked (or caught and rethrown, I guess), resulting in the program
aborting. This was not the case with 6.3.
This has been reported and confirmed on Debian/Ubuntu (amd64) so far.
I'm attaching a small example that reproduces this behavior:
$ gcc -o readline_sigalrm readline_sigalrm.c -lreadline -lpthread
$ ./readline_sigalrm
> Alarm clock
Note that disabling rl_catch_signals doesn't have any effect on this.
(This probably wouldn't be a good solution for us anyway.)
(I also noticed that this only seemed to occur when readline() was
called from the main thread. I suppose this could very well be
OS-specific, though.)
Please let me know if there's anything I can do to help. Thanks!
[*] https://github.com/LubosD/twinkle/issues/89
readline_sigalrm.c
Description: Text Data
- [Bug-readline] readline() in 7.0 seems to interfere with blocked SIGALRM,
Frédéric Brière <=