}
pid = getpid();
- setproctitle("task[%s] pre-fork master", service_name);
- /*
- * We must fit within 15 chars of text or we will truncate, so
- * we put the constant part last
- */
- prctl_set_comment("%s[master]", service_name);
+
+ process_set_title("%s[master]", "task[%s] pre-fork master", service_name);
/*
* this will free all the listening sockets and all state that
free(w);
TALLOC_FREE(ev);
- setproctitle("task[%s] pre-forked worker(%d)",
- service_name,
- pd->instances);
- /*
- * We must fit within 15 chars of text or we will truncate, so
- * we put child number last
- */
- prctl_set_comment("%s(%d)",
+
+ process_set_title("%s(%d)",
+ "task[%s] pre-forked worker(%d)",
service_name,
pd->instances);
+
prefork_reload_after_fork();
if (service_details->post_fork != NULL) {
service_details->post_fork(task, pd);
proc_ctx->forked_on_accept = true;
pid = getpid();
- setproctitle("task[%s] standard worker", proc_ctx->name);
- /*
- * We must fit within 15 chars of text or we will truncate, so
- * we put the constant part last
- */
- prctl_set_comment("%s[work]", proc_ctx->name);
+ process_set_title("%s[work]", "task[%s] standard worker", proc_ctx->name);
/* This is now the child code. We need a completely new event_context to work with */
smb_panic("Failed to add SIGTERM handler after fork");
}
- setproctitle("task[%s]", service_name);
- /*
- * We must fit within 15 chars of text or we will truncate, so
- * we put the constant part last
- */
- prctl_set_comment("%s[task]", service_name);
+ process_set_title("%s[task]", "task[%s]", service_name);
force_check_log_size();