|
|
Generally, each system service maps its error conditions to the generic error codes defined by the operating system. However, some errors have been added especially for SCO TCP/IP.
Check for error returns after every system call. Most calls have one or more associated error values, which are described in the manual page for the call. An error condition is indicated by an otherwise impossible return value This is almost always -1. An error number is made available in the external variable errno. The errno variable is set only when an error incurred and is not cleared on successful calls. Consequently, it should be tested only after an error has been indicated. Use perror(S) to print error messages.