[prev in list] [next in list] [prev in thread] [next in thread]
List: stunnel-users
Subject: Re: imapd logout error messages
From: Hans Werner Strube <strube () physik3 ! gwdg ! de>
Date: 2001-09-19 9:41:08
[Download RAW message or body]
> Below there is a portion of a "truss" log related to the occurrence of
> > SSL_read (SSL_ERROR_SYSCALL): Interrupted system call (4)
> > linger (local): Interrupted system call (4)
> in stunnel-3.20 when a "-l" client exits. The strange thing is that the
> last errno values are still 131 and 22, respectively, as in 3.18; but the
> above error messages (written by putmsg) show 4 instead.
> Somehow errno seems to get overwritten before it is used in sockerror().
I found the reason. In multithreaded programs, errno must not be a global
variable but a function, which is switched in errno.h by _REENTRANT.
The 3.20 form of common.h defines _REENTRANT only *after* #include <errno.h>.
Rather, #define _REENTRANT must occur before any #includes!
Thus, move lines 140-149 of common.h (3.20) after line 51
(if necessary(?), bracketed by #ifndef USE_WIN32 ... #endif).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic