1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

ctdb: Change the ctdb_vfork_exec prototype to const char*const*

I could not find out how to cast a char ** to const char ** without
warning. This transfers fine to the execv call as well.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Volker Lendecke 2024-09-20 02:54:57 +02:00 committed by Martin Schwenke
parent cc76e2c7d7
commit 83716809a8
2 changed files with 10 additions and 6 deletions

View File

@ -609,9 +609,11 @@ int switch_from_server_to_client(struct ctdb_context *ctdb);
void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid);
pid_t ctdb_fork(struct ctdb_context *ctdb);
pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
const char *helper, int helper_argc,
const char **helper_argv);
pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx,
struct ctdb_context *ctdb,
const char *helper,
int helper_argc,
const char *const *helper_argv);
struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb);

View File

@ -105,9 +105,11 @@ pid_t ctdb_fork(struct ctdb_context *ctdb)
/*
* vfork + exec
*/
pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
const char *helper, int helper_argc,
const char **helper_argv)
pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx,
struct ctdb_context *ctdb,
const char *helper,
int helper_argc,
const char *const *helper_argv)
{
pid_t pid;
struct timeval before;