Child panics on OpenSolaris

Nils Goroll slink at schokola.de
Wed Feb 17 10:59:22 CET 2010


Hi Poul-Henning and all,

> We need CFLAGS to contain -mt on solaris, otherwise errno does not
> get macro-fied to be per-thread.
> 
> That's where the: EBADF comes from, some entirely different
> filedescriptor a long time ago, in the master process...

Fantastic. Thank you for putting so much effort into this.

But also: Stupid I didn't think about this. See how I'm compiling varnish since 
I started working with it:

## 64bit
LDFLAGS="-lpthread"
CFLAGS="-D_REENTRANT -m64" \
VCC_CC="exec gcc -fpic -D_REENTRANT -m64 -shared -o %o %s" \
./configure \
	'--enable-debugging-symbols' \
	'--enable-developer-warnings' \
	'--enable-dependency-tracking' \
	....

IIUC, this effectively has the same effect as -mt for SunCC:

User Commands                                               cc(1)



NAME
      cc - C compiler

[...]

      -mt  Use this option to compile and link multithreaded code.
           The -mt option assures that libraries are linked in the
           appropriate order.

           This option passes -D_REENTRANT to the preprocessor and
           passes -lthread in the correct order to ld.

           If you are using POSIX threads, you must link with the
           options -mt -lpthread.

Nils



More information about the varnish-misc mailing list