Unix Programming - Re: Is errno thread safe?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2007 > Re: Is errno thread safe?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Is errno thread safe?
Maxim Yegorushkin

2007-05-17, 7:16 am

On 14 May, 17:25, Paul Pluzhnikov <ppluzhnikov-...@charter.net> wrote:

> Yes, errno is thread-safe on all platforms that support POSIX
> threads, *provided* you compile your code correctly.
>
> How to do so depends on the platform. On Solaris, compile with
> -D_REENTRANT, on AIX with -D_THREAD_SAFE. On Linux, compile with
> '-pthread' (though Linux errno is thread-safe by default).


Why not -pthreads with gcc, and -mt with Sun compiler on Solaris?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com