From owner-cvs-all Tue Feb 4 0:26:33 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8389537B401; Tue, 4 Feb 2003 00:26:31 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24C8843F93; Tue, 4 Feb 2003 00:26:31 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id DAC88AE163; Tue, 4 Feb 2003 00:26:25 -0800 (PST) Date: Tue, 4 Feb 2003 00:26:25 -0800 From: Alfred Perlstein To: Wes Peters Cc: Mikhail Teterin , Mario Sergio Fujikawa Ferreira , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/multimedia/mplayer Makefile pkg-comment pkg-plist ports/multimedia/mplayer/files patch-libdha::Makefile Message-ID: <20030204082625.GB85104@elvis.mu.org> References: <200302030506.h1356Nha011918@repoman.freebsd.org> <200302031358.49261.mi+mx@aldan.algebra.com> <1044319099.358.57.camel@zaphod.softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1044319099.358.57.camel@zaphod.softweyr.com> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Wes Peters [030203 23:41] wrote: > On Mon, 2003-02-03 at 18:58, Mikhail Teterin wrote: > > There remains an unresolved issue with mplayer on FreeBSD -- some of the > > libraries it dlopens and dlcloses are calling atexit() in between with > > their own functions. > > > > This causes SEGFAULTs in exit(), which tries to call those functions. > > The application catches the signals and would not quit until SIGKILL-ed. > > > > This does not affect Linux, where, reportedly, calls to atexit() are > > treated differently if made from dlopened code. I'm not sure how best > > to fix this (Call _exit()? Remove signal handlers before exit()?), but > > something needs to be done... > > I think ideally we'd want dlclose to be able to deinstall any atexit > handlers that were installed by library functions. The most straight- > forward path to this I can see is an atexit-remove call that can be > passed a start and end address and will remove any function references > found between the two. dlclose could call this function with the start > and end addresses of the library text segment to remove any exit > handlers in the library code space. > > I can probably take a look at this later in the week if this seems like > a reasonable approach. Please see if you can emulate the glibc behaviour just to ease porting. I think that means you must actually call the atexit handler, not just deregister it. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message