ast_comparator/test/student_data/anonymized/reference_17_tsh.c
void 
eval(char *cmdline) 
{
    if (verbose) printf("------------eval\n");
    int bg;              /* should the job run in bg or fg? */
    struct cmdline_tokens tok;

    /* Parse command line */
    bg = parseline(cmdline, &tok); 
    if (bg == -1) /* parsing error */
        return;
    if (tok.argv[0] == NULL) /* ignore empty lines */
        return;
    if (tok.builtins != BUILTIN_NONE){ /* exec builtins*/ 
        exec_builtin(&tok);
        return;
    }
    if (verbose) printf("run child\n");
    run_child(cmdline, &tok, bg);
    return;
}
/* 
 * eval - Evaluate the command line that the user has just typed in
 * 
 * If the user has requested a built-in command (quit, jobs, bg or fg)
 * then execute it immediately. Otherwise, fork a child process and
 * run the job in the context of the child. If the job is running in
 * the foreground, wait for it to terminate and then return.  Note:
 * each child process must have a unique process group ID so that our
 * background children don't receive SIGINT (SIGTSTP) from the kernel
 * when we type ctrl-c (ctrl-z) at the keyboard.  
 */
Evaluate the command line that the user has just typed in

If the user has requested a built-in command (quit, jobs, bg or fg)
then execute it immediately. Otherwise, fork a child process and
run the job in the context of the child. If the job is running in
the foreground, wait for it to terminate and then return.  Note:
each child process must have a unique process group ID so that our
background children don't receive SIGINT (SIGTSTP) from the kernel
when we type ctrl-c (ctrl-z) at the keyboard.
Evaluate the command line that the user has just typed in If the user has requested a built - in command ( quit jobs bg or fg ) then execute it immediately . Otherwise fork a child process and run the job in the context of the child . If the job is running in the foreground wait for it to terminate and then return . Note : each child process must have a unique process group ID so that our background children don ' t receive SIGINT ( SIGTSTP ) from the kernel when we type ctrl - c ( ctrl - z ) at the keyboard .
void 
eval(char *cmdline) 
{
    if (verbose) printf("------------eval\n");
    int bg;              
    struct cmdline_tokens tok;
    bg = parseline(cmdline, &tok); 
    if (bg == -1) 
        return;
    if (tok.argv[0] == NULL) 
        return;
    if (tok.builtins != BUILTIN_NONE){  
        exec_builtin(&tok);
        return;
    }
    if (verbose) printf("run child\n");
    run_child(cmdline, &tok, bg);
    return;
}
void eval ( char * cmdline ) { if ( verbose ) printf ( " \n " ) ; int bg ; struct cmdline_tokens tok ; bg = parseline ( cmdline , & tok ) ; if ( bg == -1 ) return ; if ( tok . argv [ 0 ] == NULL ) return ; if ( tok . builtins != BUILTIN_NONE ) { exec_builtin ( & tok ) ; return ; } if ( verbose ) printf ( " \n " ) ; run_child ( cmdline , & tok , bg ) ; return ; }
eval - Evaluate the command line that the user has just typed in
eval - Evaluate the command line that the user has just typed in
/* should the job run in bg or fg? */ /* Parse command line */ /* parsing error */ /* ignore empty lines */ /* exec builtins*/