sg_set_error man page

sg_set_error, sg_set_error_with_errno, sg_set_error_with_errno_code, sg_clear_error — sets the error condition

Synopsis

#include <statgrab.h>

sg_errorsg_set_error (sg_errorcode, const char *arg);

sg_errorsg_set_error_with_errno (sg_errorcode, const char *arg);

sg_errorsg_set_error_with_errno_code (sg_errorcode, const char *arg, int errno_value);

voidsg_clear_error (void);

Description

sg_set_error() sets the occurred error condition together with an argument. The argument is usually descriptive, eg. the file name which failed to open.

sg_set_error_with_errno() sets the occurred error condition together with an argument and the value of the system libraries errno value. The argument is usually descriptive, eg. the name of the failed sysctl() call.

sg_set_error_with_errno_code() sets the occurred error condition together with an argument and an error value of a system library call which doesn't set the errno value (eg. the pthread_* calls). The argument is usually descriptive, eg. the name of the mutex failed to get locked.

sg_clear_error() clears the current error condition.

See Also

statgrab(3)

Website

http://www.i-scream.org/libstatgrab/

Referenced By

sg_comp_init(3), sg_internal-intro(3).

sg_clear_error(3), sg_set_error_with_errno(3) and sg_set_error_with_errno_code(3) are aliases of sg_set_error(3).

2013-06-07 i-scream