Old-Fashioned errno Handling

Old-Fashioned errno Handling — A few tricks which operate on the same type as errno, an int.

Synopsis

gboolean            gsk_errno_is_ignorable              (int errno_value);
int                 gsk_errno_from_fd                   (int fd);

Description

Methods to determine in an errno is important, and to extract it from a file-descriptor that had an error.

Details

gsk_errno_is_ignorable ()

gboolean            gsk_errno_is_ignorable              (int errno_value);

Determine whether an errno code is insignificant.

errno_value :

errno value.

Returns :

whether the error is a transient ignorable error.

gsk_errno_from_fd ()

int                 gsk_errno_from_fd                   (int fd);

Query the file descriptor for the last error which occurred on it.

fd :

a file descriptor.

Returns :

the errno code for the last error on the file descriptor.