+ if (*pid) /* parent */
+ return;
+ signal(SIGINT, SIG_DFL);
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
+ execvp(file, args);
+ DSS_EMERG_LOG(("execvp error: %s\n", strerror(errno)));
+ _exit(EXIT_FAILURE);
+}
+
+/**
+ * Exec the command given as a command line.
+ *
+ * \param pid Will hold the pid of the created process upon return.
+ * \param cmdline Holds the command and its arguments, separated by spaces.
+ *
+ * This function uses fork/exec to create a new process.
+ *
+ * \return Standard.
+ */
+void dss_exec_cmdline_pid(pid_t *pid, const char *cmdline)
+{
+ char **argv, *tmp = dss_strdup(cmdline);
+
+ split_args(tmp, &argv, " \t");
+ dss_exec(pid, argv[0], argv);
+ free(argv);
+ free(tmp);