summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-14 01:01:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:22 -0500
commitbb2571cb9071ff0367122e651d96cb2d39494257 (patch)
treea098e43d29e4240e32e7423acc661633ae195efa
parenta2b250258502907399dbbe9f738d4212c1b0618e (diff)
downloadsamba-bb2571cb9071ff0367122e651d96cb2d39494257.tar.gz
samba-bb2571cb9071ff0367122e651d96cb2d39494257.tar.bz2
samba-bb2571cb9071ff0367122e651d96cb2d39494257.zip
r22833: use EVENT_FD_AUTOCLOSE in our event test suite
(This used to be commit 9109d43595ce0a5e4b58df659f745da081ce5f4d)
-rw-r--r--source4/torture/local/event.c3
1 files changed, 1 insertions, 2 deletions
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) {