Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GETERRNO(3)		  Schily's LIBRARY FUNCTIONS		   GETERRNO(3)

NAME
       geterrno() - gets system	error number

SYNOPSIS
       int geterrno()

DESCRIPTION
       geterrno()  enables  the	 programmer  to	find out exactly what the last
       failure was. This is often necessary since some subroutines just	 indi-
       cate  success  or failure, rather than directly return definitive error
       codes.

       For example, comerr() uses geterrno() to	retrieve  the  last  error  so
       that an appropriate message can be printed.

RETURNS
       Returns	the  error code	for the	last system error that occurred	in the
       current process,	e.g., after a call to fileopen() failed.

SEE ALSO
       comerr(3), comerrno(3), error(3), errmsg(3)

NOTES
       The value returned by geterrno()	is only	valid  after  the  immediately
       preceding system	call failed.

Joerg Schilling			  2022/09/09			   GETERRNO(3)

NAME | SYNOPSIS | DESCRIPTION | RETURNS | SEE ALSO | NOTES

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=geterrno&sektion=3&manpath=FreeBSD+13.1-RELEASE+and+Ports>

home | help