From 878f69468d3efafca568b1507377e102a8b2d912 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 May 2007 02:42:14 +0000 Subject: r22964: log an error on epoll_create failing on reopen (This used to be commit a69f28599845d3ea3868a574c6b0ba8db8486ef5) --- source4/lib/events/events_aio.c | 3 ++- source4/lib/events/events_epoll.c | 1 + source4/lib/events/events_standard.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source4/lib/events/events_aio.c b/source4/lib/events/events_aio.c index 68109d7265..e78487547f 100644 --- a/source4/lib/events/events_aio.c +++ b/source4/lib/events/events_aio.c @@ -108,8 +108,9 @@ static void epoll_reopen(struct aio_event_context *aio_ev) struct fd_event *fde; close(aio_ev->epoll_fd); - aio_ev->epoll_fd = epoll_create(64); + aio_ev->epoll_fd = epoll_create(MAX_AIO_QUEUE_DEPTH); if (aio_ev->epoll_fd == -1) { + DEBUG(0,("Failed to recreate epoll handle after fork\n")); return; } aio_ev->pid = getpid(); diff --git a/source4/lib/events/events_epoll.c b/source4/lib/events/events_epoll.c index cfea8363ab..5b6266fb49 100644 --- a/source4/lib/events/events_epoll.c +++ b/source4/lib/events/events_epoll.c @@ -109,6 +109,7 @@ static void epoll_reopen(struct epoll_event_context *epoll_ev) close(epoll_ev->epoll_fd); epoll_ev->epoll_fd = epoll_create(64); if (epoll_ev->epoll_fd == -1) { + DEBUG(0,("Failed to recreate epoll handle after fork\n")); return; } epoll_ev->pid = getpid(); diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c index bae4d69688..50ba4ed79f 100644 --- a/source4/lib/events/events_standard.c +++ b/source4/lib/events/events_standard.c @@ -126,6 +126,7 @@ static void epoll_reopen(struct std_event_context *std_ev) close(std_ev->epoll_fd); std_ev->epoll_fd = epoll_create(64); if (std_ev->epoll_fd == -1) { + DEBUG(0,("Failed to recreate epoll handle after fork\n")); return; } std_ev->pid = getpid(); -- cgit