When a standard library function fails, it often sets errno to the appropriate error code. The C standard requires at least 3 values for errno be set: