From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e8cbdedf95ebf8b7,start X-Google-Attributes: gidfee84,public From: David Hinz <7587678@mcimail.com> Subject: Q:Errno in multi-threaded programs. Date: 1995/11/10 Message-ID: <47vsh1$1un@hermes.dna.mci.com>#1/1 X-Deja-AN: 119080131 content-type: text/plain; charset=us-ascii organization: MCI x-url: news:comp.unix.osf.osf1 mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 1.1N (X11; I; OSF1 V3.2 alpha) In a multi-threaded application are there any special things needed to use errno safely? In the DEC "Programming With Threads" manual (page 3-13) it says that "The POSIX 1003.4a (pthread) interface returns a function value of -1 and sets the per-thread errno variable to an error code." Does this mean that I can safely use perror, errno, strerror and get the correct error message from a function that has failed? Is it necessary to set errno to 0 before a function call? Thanks for any info, David Hinz