}
ctx->id = (struct server_id) {
- .pid = getpid(), .vnn = NONCLUSTER_VNN
+ .pid = tevent_cached_getpid(), .vnn = NONCLUSTER_VNN
};
ctx->event_ctx = ev;
}
msg_ctx->id = (struct server_id) {
- .pid = getpid(), .vnn = msg_ctx->id.vnn
+ .pid = tevent_cached_getpid(), .vnn = msg_ctx->id.vnn
};
lck_path = lock_path(talloc_tos(), "msg.lock");
struct send_all_state *state = private_data;
NTSTATUS status;
- if (pid == getpid()) {
+ if (pid == tevent_cached_getpid()) {
DBG_DEBUG("Skip ourselves in messaging_send_all\n");
return 0;
}
goto fail;
}
- ret = register_with_ctdbd(ctx->conn, getpid(), messaging_ctdb_recv,
+ ret = register_with_ctdbd(ctx->conn, tevent_cached_getpid(), messaging_ctdb_recv,
ctx);
if (ret != 0) {
DBG_DEBUG("register_with_ctdbd returned %s (%d)\n",
tmp_refs = refs;
- if ((refs != NULL) && (ctdb_pid != getpid())) {
+ if ((refs != NULL) && (ctdb_pid != tevent_cached_getpid())) {
/*
* Have to reinit after fork
*/
*err = ret;
return NULL;
}
- ctdb_pid = getpid();
+ ctdb_pid = tevent_cached_getpid();
}
result->fde = messaging_ctdb_register_tevent_context(result, ev);