HW2 released: 09/21, 22:00 due: 09/28, 13:00 Study 09/21's lecture handout (https://naizhengtan.github.io/21fall/notes/handout_3a.pdf) and answer the following questions. Submit your answers to Canvas assignments. There is an entry for this homework. Question 1: Describe what happens when line 21 is executed. [hint: read "$ man 2 execve"] Question 2: Compile and run the code below. """ #include int main() { // We used to have a bug here (can you see why?) // the line was: char * argv[] = {"ls", "-a"} char * argv[] = {"ls", "-a", NULL}; int ret = execve("/bin/ls", argv, 0); } """ Write down the output of this program and what you think happened. [open question: "ls" is part of the arguments ({"ls", "-a"}). why? what if you replace "ls" with something else? do you expect this outcome? and what do you think of this consequence (of replacing "ls" with something else)?] Question 3: Describe what happens when line 23 is executed. [hint: read "$ man 2 wait"] Question 4: In line 23, what does "0" mean in "wait(0)"? [hint: read "$ man 2 wait"] Question 5: Describe what happens when line 69-71 are executed. [hint: read "$ man 2 pipe"] Question 6: Read "6. Commentary" (starting line 153). And answer the question---have you read "6. Commentary"?