Question 3
What does the following ‘xv6‘ code snippet accomplish?
int pid;
pid = fork();if (pid == 0) { execlp("ls", "ls", "-l", NULL); exit(0);} else if (pid > 0) { int status; wait(&status);}Both the parent and child processes execute the ‘ls‘ command concurrently.
The child process executes the ‘ls -l‘ command, and the parent process waits for it to complete.
The parent process executes the ‘ls -l‘ command, and the child process terminates.
None of these