lib/process.c
/* Prepare to start a process whose command-line arguments are given by the
 * null-terminated 'argv' array.  Returns 0 if successful, otherwise a
 * positive errno value. */
Prepare to start a process whose command-line arguments are given by the
null-terminated 'argv' array.  Returns 0 if successful, otherwise a
positive errno value.
Prepare to start a process whose command - line arguments are given by the null - terminated ' argv ' array . Returns 0 if successful otherwise a positive errno value .
static int
process_prestart(char **argv)
{
    char *binary;
    process_init();
    if (VLOG_IS_DBG_ENABLED()) {
        char *args = process_escape_args(argv);
        VLOG_DBG("starting subprocess: %s", args);
        free(args);
    }
    binary = process_search_path(argv[0]);
    if (!binary) {
        VLOG_ERR("%s not found in PATH", argv[0]);
        return ENOENT;
    }
    free(binary);
    return 0;
}
static int process_prestart ( char * * argv ) { char * binary ; process_init ( ) ; if ( VLOG_IS_DBG_ENABLED ( ) ) { char * args = process_escape_args ( argv ) ; VLOG_DBG ( " " , args ) ; free ( args ) ; } binary = process_search_path ( argv [ 0 ] ) ; if ( ! binary ) { VLOG_ERR ( " " , argv [ 0 ] ) ; return ENOENT ; } free ( binary ) ; return 0 ; }
Prepare to start a process whose command-line arguments are given by the
 null-terminated 'argv' array.
Prepare to start a process whose command - line arguments are given by the null - terminated ' argv ' array .
/* Log the process to be started. */ /* execvp() will search PATH too, but the error in that case is more
     * obscure, since it is only reported post-fork. */