src/mn-slaved/hook.c
int
nol_s_hook_invoke(unsigned hook_id)
{
    char    *run;
    if (hook_id >= NUM_HOOKS || !hook_list[hook_id])
        return -1;
#ifdef DEBUG
    syslog(LOG_DEBUG, "invoking hook '%s'\n", hook_str[hook_id]);
#endif
    /*
    asprintf(&run, "./%s %d",
            hook_str[hook_id], sess_id);
            */
    asprintf(&run, "./%s",
            hook_str[hook_id]);
    system(run);
    free(run);
    return 0;
}
/** 
 * start the hook script
 *
 * Currently this function simply runs system(),
 * but we should fork and do an exec() instead
 **/
start the hook script
Currently this function simply runs system(),
but we should fork and do an exec() instead
start the hook script Currently this function simply runs system () but we should fork and do an exec () instead
int
nol_s_hook_invoke(unsigned hook_id)
{
    char    *run;
    if (hook_id >= NUM_HOOKS || !hook_list[hook_id])
        return -1;
#ifdef DEBUG
    syslog(LOG_DEBUG, "invoking hook '%s'\n", hook_str[hook_id]);
#endif
    asprintf(&run, "./%s",
            hook_str[hook_id]);
    system(run);
    free(run);
    return 0;
}
int nol_s_hook_invoke ( unsigned hook_id ) { char * run ; if ( hook_id >= NUM_HOOKS || ! hook_list [ hook_id ] ) return -1 ; #ifdef DEBUG syslog ( LOG_DEBUG , " \n " , hook_str [ hook_id ] ) ; #endif asprintf ( & run , " " , hook_str [ hook_id ] ) ; system ( run ) ; free ( run ) ; return 0 ; }
start the hook script
 Currently this function simply runs system(),
 but we should fork and do an exec() instead
start the hook script Currently this function simply runs system () but we should fork and do an exec () instead
/*
    asprintf(&run, "./%s %d",
            hook_str[hook_id], sess_id);
            */