Date: Wed, 21 Aug 2002 15:21:15 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Lance Bland <lbland@vvi.com> Cc: questions@FreeBSD.ORG Subject: Re: is errno thread safe? (was Re: Porting from win32 to UNIX: Sockets) Message-ID: <20020821202114.GE97484@dan.emsphone.com> In-Reply-To: <F4B19F04-B540-11D6-9FB6-0030659A531A@vvi.com> References: <Pine.LNX.4.44.0208211547160.17257-100000@janeway.vonbek.dhs.org> <F4B19F04-B540-11D6-9FB6-0030659A531A@vvi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Aug 21), Lance Bland said:
> hi-
>
> is errno thread safe?
man errno:
Nearly all of the system calls provide an error number referenced
via the external identifier errno. This identifier is defined in
<sys/errno.h> as
extern int * __error();
#define errno (* __error())
The __error() function returns a pointer to a field in the thread
specific structure for threads other than the initial thread. For
the initial thread and non-threaded processes, __error() returns a
pointer to a global errno variable that is compatible with the
previous definition.
--
Dan Nelson
dnelson@allantgroup.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020821202114.GE97484>
