Due: April 18, 2022
Points: 100
Please form a team of 2 or 3. Include the names of all team members in the header comment. One person needs to submit the program; the other team members must submit a short note identifying who turned in the program.
When this command is issued, the timeout program is to execute “command …”. After s seconds have passed, timeout is to send a SIGTERM signal to the command timeout is running.
You must use fork(2) and execve(2) to run the subcommand.
Don’t forget to check for possible errors, such as a negative number of seconds or no command!
The program should loop until sent signal 9 (SIGKILL). This signal cannot be caught.
If the files are hard links, print
If file1 is a symbolic link to file2, print
If the files are not linked, print
If a system error occurs (for example, a file does not exist), use perror(3) to print the appropriate error message.
|
ECS 150, Operating Systems Version of April 5, 2022 at 5:39PM
|
You can also obtain a PDF version of this. |