[dovecot-cvs] dovecot/src/lib ioloop-notify-dn.c,1.14,1.15

cras at dovecot.org cras at dovecot.org
Sun Apr 9 22:37:32 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv25655

Modified Files:
	ioloop-notify-dn.c 
Log Message:
Make sure errno is restored when exiting SIGRT signal handler.



Index: ioloop-notify-dn.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-notify-dn.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ioloop-notify-dn.c	29 Jan 2006 10:55:22 -0000	1.14
+++ ioloop-notify-dn.c	9 Apr 2006 19:37:29 -0000	1.15
@@ -29,6 +29,7 @@
 {
 	struct ioloop_notify_handler_context *ctx =
 		current_ioloop->notify_handler_context;
+	int saved_errno = errno;
 	int ret;
 
 	ret = write(ctx->event_pipe[1], &si->si_fd, sizeof(int));
@@ -36,6 +37,8 @@
 		i_fatal("write(event_pipe) failed: %m");
 
 	i_assert(ret <= 0 || ret == sizeof(int));
+
+	errno = saved_errno;
 }
 
 static void event_callback(void *context)



More information about the dovecot-cvs mailing list