#include "replace.h"
#include "system/select.h"
#include "system/threads.h"
+#include "system/filesys.h"
#include "pthreadpool_tevent.h"
#include "pthreadpool.h"
#include "lib/util/tevent_unix.h"
return ENOMEM;
}
tevent_fd_set_auto_close(glue->fde);
+ monitor_fd = -1;
}
/*
*/
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
while (job->needs_fence.wrapper) {
- poll(NULL, 0, 1);
+ (void)poll(NULL, 0, 1);
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
}
job->wrapper = NULL;
if (job->needs_fence.signaled) {
break;
}
- poll(NULL, 0, 1);
+ (void)poll(NULL, 0, 1);
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
}
struct pthreadpool_tevent_job_state *state = NULL;
struct pthreadpool_tevent_job *job = NULL;
int ret;
+ struct pthreadpool_tevent *caller_pool = pool;
struct pthreadpool_tevent_wrapper *wrapper = pool->wrapper.ctx;
pthreadpool_tevent_cleanup_orphaned_jobs();
return tevent_req_post(req, ev);
}
PTHREAD_TEVENT_JOB_THREAD_FENCE_INIT(job);
- job->per_thread_cwd = pthreadpool_tevent_per_thread_cwd(pool);
+ job->per_thread_cwd = pthreadpool_tevent_per_thread_cwd(caller_pool);
talloc_set_destructor(job, pthreadpool_tevent_job_destructor);
DLIST_ADD_END(job->pool->jobs, job);
job->state = state;