Locking can be found at https://linux.die.net/man/2/flock
Starter web serverThis assignment is out of 6,000,000 points. There
is a maximum of 6,500,000 points on this assignment.
2,000,000 - Does HTTP. Sends files. Sends the right mime type for text/html, image/jepg, and image/gif.
2,000,000 - Can handle multiple connections using fork
1,000,000 – Lock and seek correctly the log file.
500,000 - Can translate the ~user notation into /home/user/pub
500,000 - Uses getpwent() or getpwnam() to translate correctly (be careful about memory deallocation).
500,000 - Only sends files that are world readable
see stat()
1,000,000 - Creates a directory listing if this is a directory
see stat() and opendir()/readdir()/closedir()
500,000 - There is a log file with filenames.
300,000 - Log file is correctly formatted (filename must be right. Other data can be faked).
300,000 - Date is right in the log file
300,000 - Date has the right format
300,000 - Log file contains the right browser type extracted from the request.
300,000 - Sends a 404 page if the file is not found
-300,000 - Each work day after Fri Mar 23th.
-1,000,000 - crashes if the file is not found