/**
 * File: execvp-demo.c
 * ----------------
 * Demonstrates the build-in execvp() function.  This is not commonly how
 * execvp is used (usually it is run from within a child process, to avoid
 * consuming the parent) - but this is an example to show its behavior.
 */

#include <stdio.h>
#include <unistd.h>

int main(int argc, char *argv[]) {
    printf("Hello, world!\n");
    char *args[] = {"/bin/ls", "-l", "/usr/class/cs111/lecture-code", NULL};
    execvp(args[0], args);
    printf("This only prints if an error occurred.\n");
    return 0;
}
