From bb2571cb9071ff0367122e651d96cb2d39494257 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 May 2007 01:01:05 +0000 Subject: r22833: use EVENT_FD_AUTOCLOSE in our event test suite (This used to be commit 9109d43595ce0a5e4b58df659f745da081ce5f4d) --- source4/torture/local/event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/torture/local/event.c b/source4/torture/local/event.c index 740e2addfe..1a6f317ca6 100644 --- a/source4/torture/local/event.c +++ b/source4/torture/local/event.c @@ -82,7 +82,7 @@ static bool test_event_context(struct torture_context *test, /* create a pipe */ pipe(fd); - fde = event_add_fd(ev_ctx, ev_ctx, fd[0], EVENT_FD_READ, + fde = event_add_fd(ev_ctx, ev_ctx, fd[0], EVENT_FD_READ|EVENT_FD_AUTOCLOSE, fde_handler, fd); event_add_timed(ev_ctx, ev_ctx, timeval_current_ofs(2,0), @@ -105,7 +105,6 @@ static bool test_event_context(struct torture_context *test, } talloc_free(fde); - close(fd[0]); close(fd[1]); while (alarm_count < fde_count+1) { -- cgit