1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 05:30:21 +02:00

When checking whether readline clears SA_RESTART, let readline read

from "/dev/null".  Otherwise, it might be stopped when run in the
background with job control, say.  Thanks to Michael Talbot-Wilson!
This commit is contained in:
Marius Vollmer 2003-05-03 23:18:51 +00:00
parent 4435705715
commit 3894870bde

View file

@ -88,6 +88,16 @@ main ()
action.sa_flags |= SA_RESTART;
sigaction (SIGWINCH, &action, NULL);
/* Give readline something to read. Otherwise, it might hang, for
example when run as a background process with job control.
*/
rl_instream = fopen ("/dev/null", "r");
if (rl_instream == NULL)
{
perror ("/dev/null");
exit (1);
}
rl_pre_input_hook = hook;
readline ("");
}],