summaryrefslogtreecommitdiff
path: root/lib/util/util_file.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-17 23:21:28 +0100
committerJeremy Allison <jra@samba.org>2013-03-01 11:59:24 -0800
commitd5b341d873bc326843d80dd15d3cd3ef465234ae (patch)
treef024c63faf0635140eaec04325480379d9768b4f /lib/util/util_file.c
parentf86df3e364f55be5f320463e3c1b89ee3a49115e (diff)
downloadsamba-d5b341d873bc326843d80dd15d3cd3ef465234ae.tar.gz
samba-d5b341d873bc326843d80dd15d3cd3ef465234ae.tar.bz2
samba-d5b341d873bc326843d80dd15d3cd3ef465234ae.zip
tevent: don't skip a fd event if the previous one was deleted during poll()
In a threaded environment it can happen that an tevent_fd is talloc_free'ed while the main thread sleeps in the poll() syscall. In such a case poll_event_fd_destructor() would set poll_ev->fdes[i] = NULL. We then skip the removed event, but before we also skipped the one that was located at the end of the array. We moved it to possition 'i', but the next loop uses 'i=i+1'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/util/util_file.c')
0 files changed, 0 insertions, 0 deletions