mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
scd: Fix for GNU/Linux suspend/resume.
* configure.ac (require_pipe_to_unblock_pselect): Default is "yes". * scd/scdaemon.c (scd_kick_the_loop): Minor clean up. -- Normally SIGCONT or SIGUSR2 works for unblocking pselect. But on my machine with GNU/Linux, when a machine is suspend/resume-ed, pselect keeps blocked, while signal itself is delivered. It's better to use pipe. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
655f0b9ad0
commit
71e5282c25
@ -639,7 +639,7 @@ have_android_system=no
|
||||
use_simple_gettext=no
|
||||
use_ldapwrapper=yes
|
||||
mmap_needed=yes
|
||||
require_pipe_to_unblock_pselect=no
|
||||
require_pipe_to_unblock_pselect=yes
|
||||
case "${host}" in
|
||||
*-mingw32*)
|
||||
# special stuff for Windoze NT
|
||||
@ -654,6 +654,7 @@ case "${host}" in
|
||||
have_w32_system=yes
|
||||
require_iconv=no
|
||||
use_ldapwrapper=no # Fixme: Do this only for CE.
|
||||
require_pipe_to_unblock_pselect=no
|
||||
case "${host}" in
|
||||
*-mingw32ce*)
|
||||
have_w32ce_system=yes
|
||||
|
@ -1206,18 +1206,16 @@ start_connection_thread (void *arg)
|
||||
void
|
||||
scd_kick_the_loop (void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Kick the select loop. */
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
ret = SetEvent (the_event);
|
||||
int ret = SetEvent (the_event);
|
||||
if (ret == 0)
|
||||
log_error ("SetEvent for scd_kick_the_loop failed: %s\n",
|
||||
w32_strerror (-1));
|
||||
#elif defined(HAVE_PSELECT_NO_EINTR)
|
||||
write (notify_fd, "", 1);
|
||||
#else
|
||||
ret = kill (main_thread_pid, SIGCONT);
|
||||
int ret = kill (main_thread_pid, SIGCONT);
|
||||
if (ret < 0)
|
||||
log_error ("SetEvent for scd_kick_the_loop failed: %s\n",
|
||||
gpg_strerror (gpg_error_from_syserror ()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user