NULL, 0,
&agent_pid,
SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH,
- SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, "--watch", NULL);
+ SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH,
+ "--watch");
if (r < 0)
return log_error_errno(r, "Failed to fork TTY ask password agent: %m");
return -errno;
}
-int fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) {
+int _fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) {
bool stdout_is_tty, stderr_is_tty;
size_t n, i;
va_list ap;
int fexecve_or_execve(int executable_fd, const char *executable, char *const argv[], char *const envp[]);
-int fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) _sentinel_;
+int _fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) _sentinel_;
+#define fork_agent(name, ...) _fork_agent(name, __VA_ARGS__, NULL)
&agent_pid,
POLKIT_AGENT_BINARY_PATH,
POLKIT_AGENT_BINARY_PATH,
- "--notify-fd",
- notify_fd,
- "--fallback",
- NULL);
+ "--notify-fd", notify_fd,
+ "--fallback");
/* Close the writing side, because that's the one for the agent */
safe_close(pipe_fd[1]);