Your program must be robust. If any of the calls fail, it
should print error message and exit with appropriate error code.
Always check for failure when invoking any system or library call.
By convention, most UNIX calls return a value of NULL or negative one (-1)
in case of an error (but always check the RETURN VALUES section of
each man page for details), and you can use this information for a graceful
exit. Use cerr, perror(3), or strerror(3) library
routines to generate/print appropriate error messages.
For example, something like the following (but with a real syscall name, and
real bad value check):
if (syscall(args) == BAD_VALUE) {
perror("syscall");
exit(1);
}
You will lose up to 5 points if you do not do this.