This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: readline messing with SA_RESTART for SIGWINCH
- To: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Subject: Re: readline messing with SA_RESTART for SIGWINCH
- From: "Dale P. Smith" <dpsm at en dot com>
- Date: Thu, 15 Jun 2000 17:13:29 -0400
- CC: bug-guile <bug-guile at gnu dot org>, guile <guile at sourceware dot cygnus dot com>,djurfeldt at nada dot kth dot se
- Organization: Altus Technologies Corporation.
- References: <39492994.33100449@en.com> <xy7em5ywv6q.fsf@mdj.nada.kth.se>
Mikael Djurfeldt wrote:
> If anyone provides the code for rl_pre_input_hook and a test for
> configure (code is sufficient), then I'll include it in the 1.4
> release.
Ok, here is a test to see if readline turns off SA_RESTART.
You should of course already know that you have readline and SA_RESTART.
-Dale
--
Dale P. Smith
Altus Technologies Corp.
dsmith@altustech.com
400-746-9000 x309
#include <signal.h>
#include <stdio.h>
#include <readline/readline.h>
int hook(void) {
struct sigaction action;
sigaction (SIGWINCH, NULL, &action);
rl_cleanup_after_signal();
/* exit with 0 if readline did not disable SA_RESTART */
exit(!(action.sa_flags & SA_RESTART));
}
int main() {
struct sigaction action;
sigaction (SIGWINCH, NULL, &action);
action.sa_flags |= SA_RESTART;
sigaction (SIGWINCH, &action, NULL);
rl_pre_input_hook = hook;
readline ("");
}