summaryrefslogtreecommitdiffstats
path: root/scd/scdaemon.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>2012-01-19 22:27:44 +0100
committerWerner Koch <wk@gnupg.org>2012-01-25 14:50:47 +0100
commitccbb4c3652ee72386b8889358b829e256e1ebcda (patch)
tree3ca143583d70d57d70eb68cc24cf7498a59afa08 /scd/scdaemon.c
parentPort to npth. (diff)
downloadgnupg2-ccbb4c3652ee72386b8889358b829e256e1ebcda.tar.xz
gnupg2-ccbb4c3652ee72386b8889358b829e256e1ebcda.zip
Port Windows code to NPTH.
* agent/gpg-agent.c (get_agent_ssh_socket_name): Use INVALID_HANDLE_VALUE instead of 0. (handle_signal) [!HAVE_W32_SYSTEM]: Don't define. (handle_connections): Port Windows code to NPTH. * dirmngr/dirmngr.c (handle_connections): Port Windows code to NPTH. * g13/g13.c (handle_connections): Port Windows code to NPTH. * scd/scdaemon.c (handle_connections): Port Windows code to NPTH.
Diffstat (limited to 'scd/scdaemon.c')
-rw-r--r--scd/scdaemon.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index ad5f691bb..e8073b7ee 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -1185,9 +1185,6 @@ handle_connections (int listen_fd)
npth_sigev_add (SIGINT);
npth_sigev_add (SIGTERM);
npth_sigev_fini ();
-#else
- sigs = 0;
- ev = pth_event (PTH_EVENT_SIGS, &sigs, &signo);
#endif
FD_ZERO (&fdset);
@@ -1234,17 +1231,20 @@ handle_connections (int listen_fd)
thus a simple assignment is fine to copy the entire set. */
read_fdset = fdset;
+#ifndef HAVE_W32_SYSTEM
ret = npth_pselect (nfd+1, &read_fdset, NULL, NULL, &timeout, npth_sigev_sigmask());
saved_errno = errno;
-#ifndef HAVE_W32_SYSTEM
while (npth_sigev_get_pending(&signo))
handle_signal (signo);
+#else
+ ret = npth_eselect (nfd+1, &read_fdset, NULL, NULL, &timeout, NULL, NULL);
+ saved_errno = errno;
#endif
if (ret == -1 && saved_errno != EINTR)
{
- log_error (_("pth_pselect failed: %s - waiting 1s\n"),
+ log_error (_("npth_pselect failed: %s - waiting 1s\n"),
strerror (saved_errno));
npth_sleep (1);
continue;