#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main(){
         pid_t  pid;
	/* fork another process */
	pid = fork();
	if (pid < 0) { /* error occurred */
		fprintf(stderr, "Fork Failed");
		exit(-1);
	}
	else if (pid == 0) { /* child process */
		//Overlay address space with UNIX command "ls"
		execlp("/bin/ls", "ls", NULL);
	}
	else { /* parent process */
		/* parent will wait for the child to complete */
	        wait (NULL); //NULL = 0 (MACRO)
		printf("############\n");
		printf ("Child Complete\n");
		exit(0);
	}
}

