[Dovecot] [PATCH] add missing error check in epoll code

Andrey Panin pazke at donpac.ru
Thu Oct 7 11:12:35 EEST 2004


Hello,

this patch adds missing epoll_create() error check.
Please consider applying.

Best regards.

-- 
Andrey Panin		| Linux and UNIX system administrator
pazke at donpac.ru		| PGP key: wwwkeys.pgp.net
-------------- next part --------------
diff -urpX /usr/share/dontdiff dovecot-1.0-test46.vanilla/src/lib/ioloop-epoll.c dovecot-1.0-test46/src/lib/ioloop-epoll.c
--- dovecot-1.0-test46.vanilla/src/lib/ioloop-epoll.c	2004-09-06 00:59:47.000000000 +0400
+++ dovecot-1.0-test46/src/lib/ioloop-epoll.c	2004-10-05 21:39:52.000000000 +0400
@@ -57,6 +47,8 @@ void io_loop_handler_init(struct ioloop 
 	data->fd_index = p_new(ioloop->pool, struct io_list *, data->idx_size);
 
 	data->epfd = epoll_create(INITIAL_EPOLL_EVENTS);
+	if (data->epfd < 0)
+		i_panic("epoll_create(): %m");
 }
 
 void io_loop_handler_deinit(struct ioloop *ioloop)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20041007/b575cec4/attachment-0001.bin>


More information about the dovecot mailing list