Date: Tue, 4 Feb 2003 00:26:25 -0800 From: Alfred Perlstein <bright@mu.org> To: Wes Peters <wes@softweyr.com> Cc: Mikhail Teterin <mi+mx@aldan.algebra.com>, Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>, 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> In-Reply-To: <1044319099.358.57.camel@zaphod.softweyr.com> References: <200302030506.h1356Nha011918@repoman.freebsd.org> <200302031358.49261.mi%2Bmx@aldan.algebra.com> <1044319099.358.57.camel@zaphod.softweyr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Wes Peters <wes@softweyr.com> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030204082625.GB85104>