summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2005-06-03 15:57:24 +0200
committerWerner Koch <wk@gnupg.org>2005-06-03 15:57:24 +0200
commitf1dac8851d02a0cb63fc7379ee74692856d0cf39 (patch)
tree79a731b1da742fe64ab4ee7fbca09f439954c032 /common
parentAdd stuff from gnulib. (diff)
downloadgnupg2-f1dac8851d02a0cb63fc7379ee74692856d0cf39.tar.xz
gnupg2-f1dac8851d02a0cb63fc7379ee74692856d0cf39.zip
* command.c (cmd_updatestartuptty): New.
* gpg-agent.c: New option --write-env-file. * gpg-agent.c (handle_connections): Make sure that the signals we are handling are not blocked.Block signals while creating new threads. * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H! (es_func_fd_read, es_func_fd_write): Protect against EINTR. * gpg-agent.texi (Agent UPDATESTARTUPTTY): New. * scdaemon.c (handle_connections): Make sure that the signals we are handling are not blocked.Block signals while creating new threads. (handle_connections): Include the file descriptor into the name of the thread.
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog6
-rw-r--r--common/estream.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index fccc71d49..08fb06775 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-03 Werner Koch <wk@g10code.com>
+
+ * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H!
+ (es_func_fd_read, es_func_fd_write): Protect against EINTR.
+
+
2005-06-01 Werner Koch <wk@g10code.com>
* Makefile.am (AM_CPPFLAGS): Added.
diff --git a/common/estream.c b/common/estream.c
index 00cb749e8..bf5b02001 100644
--- a/common/estream.c
+++ b/common/estream.c
@@ -22,7 +22,7 @@
# include <estream-support.h>
#endif
-#ifdef USE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -597,7 +597,9 @@ es_func_fd_read (void *cookie, char *buffer, size_t size)
estream_cookie_fd_t file_cookie = cookie;
ssize_t bytes_read;
- bytes_read = ESTREAM_SYS_READ (file_cookie->fd, buffer, size);
+ do
+ bytes_read = ESTREAM_SYS_READ (file_cookie->fd, buffer, size);
+ while (bytes_read == -1 && errno == EINTR);
return bytes_read;
}
@@ -610,7 +612,9 @@ es_func_fd_write (void *cookie, const char *buffer, size_t size)
estream_cookie_fd_t file_cookie = cookie;
ssize_t bytes_written;
- bytes_written = ESTREAM_SYS_WRITE (file_cookie->fd, buffer, size);
+ do
+ bytes_written = ESTREAM_SYS_WRITE (file_cookie->fd, buffer, size);
+ while (bytes_written == -1 && errno == EINTR);
return bytes_written;
}