CS 3733 Operating Systems, Fall 2003 Assignment 4 Comments
Assignment 4 was worth 30 points.
- Do not use #include to include source files, only header files
- In fdreceiver, open can be interrupted by a signal so you
should use r_open.
- When you create the file in fdreceiver open should have three
parameters, or use r_open3.
- You must test with asynchronous signals, not just with raise.
- You must save and restore errno in the signal handler.
- The signal handler must take a parameter (or 3) even if you are not using
the parameters in the signal handler.
- There is a problem printing the number of files and the total number of
bytes in the signal handler if signals are enabled when these are being
changed.
- When using lint run it once for each executable with all files
that are linked in that executable.
- Do not exit the program in a subroutine when an error occurs.
Comments about the extra credit:
Only one person got it essentially correct.
The structure containing the names and sizes is a shared variable,
shared between the main
program and the signal handler.
You need to block the signal when you are updating the structure containing
the names and sizes.
An assignment statement involving a pointer does not have to be atomic.
You do not have to free the linked list since it is used until the
program exits.