tevent_req_set_callback(subreq, wait_for_parent_check, req);
}
-static bool wait_for_parent_recv(struct tevent_req *req)
+static bool wait_for_parent_recv(struct tevent_req *req, int *perr)
{
- if (tevent_req_is_unix_error(req, NULL)) {
+ if (tevent_req_is_unix_error(req, perr)) {
return false;
}
tevent_req_set_callback(subreq, wait_for_lost_check, req);
}
-static bool wait_for_lost_recv(struct tevent_req *req)
+static bool wait_for_lost_recv(struct tevent_req *req, int *perr)
{
- if (tevent_req_is_unix_error(req, NULL)) {
+ if (tevent_req_is_unix_error(req, perr)) {
return false;
}
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
bool status;
+ int err;
- status = wait_for_parent_recv(subreq);
+ status = wait_for_parent_recv(subreq, &err);
TALLOC_FREE(subreq);
if (! status) {
/* Ignore error */
fprintf(stderr,
"ctdb_mutex_fcntl_helper: "
- "wait_for_parent_recv() failed\n");
+ "wait_for_parent_recv() failed (%d)\n",
+ err);
}
tevent_req_done(req);
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
bool status;
+ int err;
- status = wait_for_lost_recv(subreq);
+ status = wait_for_lost_recv(subreq, &err);
TALLOC_FREE(subreq);
if (! status) {
/* Ignore error */
fprintf(stderr,
"ctdb_mutex_fcntl_helper: "
- "wait_for_lost_recv() failed\n");
+ "wait_for_lost_recv() failed (%d)\n",
+ err);
}
tevent_req_done(req);
}
-static bool wait_for_exit_recv(struct tevent_req *req)
+static bool wait_for_exit_recv(struct tevent_req *req, int *perr)
{
- if (tevent_req_is_unix_error(req, NULL)) {
+ if (tevent_req_is_unix_error(req, perr)) {
return false;
}
tevent_req_poll(req, ev);
- status = wait_for_exit_recv(req);
+ status = wait_for_exit_recv(req, &ret);
if (! status) {
fprintf(stderr,
- "%s: wait_for_exit_recv() failed\n",
- progname);
+ "%s: wait_for_exit_recv() failed (%d)\n",
+ progname,
+ ret);
}
if (fd != -1) {