1. Engineering
  2. Computer Science
  3. 8 how can execve overwrite all of a processs memory...

Question: 8 how can execve overwrite all of a processs memory...

Question details

8) How can execve overwrite all of a process's memory while also preserving its file descriptors? Specifically, does preserving file descriptors require execve to avoid erasing some process memory?

9) Is the SA_RESTART flag on a signal handler (e.g., line 243) interpreted by code running in the process or in the kernel? Give evidence for your answer.

10) Implement a "listfiles" command that lists the files in the current directory. Give the code for the listfiles() function and show how you'd change the rest of the code so that typing "listfiles" runs this function. Your solution should not invoke an external executable; instead, it should do something similar to plist(). Show your changes by using diff -c.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution