[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Tue Jul 20 14:19:03 CEST 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/07/20 14:19:03

Modified files:
	cm3/m3-sys/cminstall/src/config-no-install/: OpenBSD.common 
	cm3/m3-libs/m3core/src/runtime/common/: RTProcessC.c 

Log message:
	This should fix the hang on I386_OPENBSD.
	That only I'm seeing. (Hudson doesn't build enough, nobody else has reported it).
	It doesn't affect 5.8.6 release as that uses jmpbuf hacking for userthreads.
	The rewrite to use sigaltstack is new since then.
	
	RTProcessC.c:
	INTEGER
	__cdecl
	RTProcess__RegisterForkHandlers(
	ForkHandler prepare,
	ForkHandler parent,
	ForkHandler child)
	{
	>> big comment added
	/* FreeBSD < 6 lacks pthread_atfork. Would be good to use autoconf.
	* VMS lacks pthread_atfork? Would be good to use autoconf.
	* Win32 lacks pthread_atfork and fork. OK.
	* OpenBSD pthread_atfork causes us to need libpthread, and then
	* sigsuspend on 4.6/x86 hangs in the userthread code.
	*
	* I expect therefore cvsup is broken with user threads on these systems.
	*
	* OpenBSD we could fix by going back to jmpbuf hacking (see 5.8.6 release),
	* but it is nice to have portable code, and cvsup maybe is expendable (again,
	* only on OpenBSD).
	*
	* As well, for all Posix systems, we could implement
	* atfork ourselves, as long as we provide a fork()
	* wrapper that code uses.
	*/
	#if defined(_WIN32) \
	|| defined(__vms) \
	|| defined(__OpenBSD__) \  << this added
	|| (defined(__FreeBSD__) && (__FreeBSD__ < 6))
	return 0;
	#else
	
	>> add
	% LIBC: No pthreads, to avoid its sigsuspend that hangs.
	% See also RTProcess__RegisterForkHandlers.
	SYSTEM_LIBS{"LIBC"} = ["-lm"]




More information about the M3commit mailing list