From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PvVap-0006m2-ME for garchives@archives.gentoo.org; Fri, 04 Mar 2011 14:02:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3277B1C086 for ; Fri, 4 Mar 2011 14:02:54 +0000 (UTC) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id E9D6F1C00C for ; Fri, 4 Mar 2011 13:45:03 +0000 (UTC) Received: by bwg12 with SMTP id 12so4034932bwg.40 for ; Fri, 04 Mar 2011 05:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type; bh=BnUlj4eYPj7lUAILkx3tz0MVO0MlL7V2U7XbW0wA9Ao=; b=kFaMfYGIYWVgVYc3/vtloL5BouKCKQcpKtZ9qo2WjYswwyil7zmRnOANC7L1tlbRdz wgSmk1hX4rpkKYLSpZr5KnmYb5QlG4G9Ei6zXibrO1SNIZAkJQtxB0X32rVcmNwik/DB qisy1tUhc6t+vW4r0CR6DtzVApiX8CfCm4mH0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=hV/Qb2nwcVFtug0g1cp/Xfn9jkkRCMz4SPvN4ImKciif15QCHYG/vyyvJ4FLVzxJjp OHCuzrJ7GwVvhwrnyYkZwpRavqnIBF0GxnJqCCsYOsZjWOPhRJtt306anxOolvxWjFvC QZBQPB7gZNAA6GSGmkqcQ+6wG3jfANlIPhCoE= Received: by 10.204.83.228 with SMTP id g36mr577736bkl.30.1299246302982; Fri, 04 Mar 2011 05:45:02 -0800 (PST) Received: from [10.10.4.253] ([193.109.100.122]) by mx.google.com with ESMTPS id f20sm1561371bkf.4.2011.03.04.05.45.01 (version=SSLv3 cipher=OTHER); Fri, 04 Mar 2011 05:45:02 -0800 (PST) Message-ID: <4D70ECD4.1050401@gmail.com> Date: Fri, 04 Mar 2011 15:44:52 +0200 From: Alessio Ababilov User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] EasyTAG 2.1.6 Handle SIGCHLD to make audacious archived skins workable Content-Type: multipart/mixed; boundary="------------070108000409000000040100" X-Archives-Salt: X-Archives-Hash: 18c0b60113d77ac4f1d249b649cec29e This is a multi-part message in MIME format. --------------070108000409000000040100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit It seems that development of EasyTAG is stopped, and so I send the patch to gentoo developers. EasyTAG calls signal(SIGCHLD,SIG_IGN) to avoid zombies. It works fine, but it leads to one problem. If one calls 'Run Audio Player', the player's SIGCHLD signal handler is inherited. So, when audacious calls system() in order to unpack its archived skin, the archiver process ends silently (the wait() call in system() function cannot hear that the child process has ended). The audacious process assumes that there was an error and an unarchived skin is used. A possible solution is to set a handler for SIGCHLD in EasyTAG. The handler is called when a child process ends and the latter doesn't become a zombie. Alessio Ababilov --------------070108000409000000040100 Content-Type: text/plain; name="easytag-2.1.6.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="easytag-2.1.6.patch" --- easytag-2.1.6/src/easytag.c.orig 2009-07-11 14:59:57.000000000 +0300 +++ easytag-2.1.6/src/easytag.c 2009-07-11 15:44:13.000000000 +0300 @@ -58,6 +58,8 @@ #ifdef WIN32 # include "win32/win32dep.h" +#else +# include #endif #include "../pixmaps/EasyTAG_icon.xpm" @@ -139,7 +141,21 @@ void Quit_Recursion_Function_Button_Pressed (void); void Quit_Recursion_Window_Key_Press (GtkWidget *window, GdkEvent *event); +#ifndef WIN32 +static void sigchld_handler(int signum) +{ + wait(NULL); +} +static void setup_sigchld() +{ + struct sigaction sa = {0}; + sa.sa_handler = sigchld_handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_RESTART; + sigaction(SIGCHLD, &sa, NULL); +} +#endif /******** * Main * @@ -169,7 +185,7 @@ signal(SIGFPE,Handle_Crash); signal(SIGSEGV,Handle_Crash); // Must handle this signal to avoid zombie of applications executed (ex: xmms) - signal(SIGCHLD,SIG_IGN); // Fix me! : can't run nautilus 1.0.6 with "Browse Directory With" + setup_sigchld(); #endif #ifdef ENABLE_NLS --------------070108000409000000040100 Content-Type: text/plain; name="easytag-2.1.6-r5.ebuild" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="easytag-2.1.6-r5.ebuild" # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-sound/easytag/easytag-2.1.6-r4.ebuild,v 1.1 2010/07/29 23:16:04 ssuominen Exp $ EAPI=2 inherit eutils fdo-mime DESCRIPTION="GTK+ utility for editing MP2, MP3, MP4, FLAC, Ogg and other media tags" HOMEPAGE="http://easytag.sourceforge.net" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 ~hppa ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" IUSE="flac mp3 mp4 speex vorbis wavpack" RDEPEND=">=x11-libs/gtk+-2.12:2 mp3? ( >=media-libs/id3lib-3.8.3-r7 media-libs/libid3tag ) flac? ( media-libs/flac media-libs/libvorbis ) mp4? ( >=media-libs/libmp4v2-1.9.0 ) vorbis? ( media-libs/libvorbis ) wavpack? ( media-sound/wavpack ) speex? ( media-libs/speex media-libs/libvorbis )" DEPEND="${RDEPEND} dev-util/pkgconfig sys-devel/gettext" src_prepare() { epatch "${FILESDIR}"/${P}-desktop_entry.patch \ "${FILESDIR}"/${P}-new_libmp4v2.patch \ "${FILESDIR}"/${P}-cddb.patch \ "${FILESDIR}"/${P}-load-from-txt.patch \ "${FILESDIR}"/${P}-sigchld.patch } src_configure() { econf \ $(use_enable mp3) \ $(use_enable mp3 id3v23) \ $(use_enable vorbis ogg) \ $(use_enable flac) \ $(use_enable mp4) \ $(use_enable wavpack) \ $(use_enable speex) } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc ChangeLog README THANKS TODO USERS-GUIDE } pkg_postinst() { fdo-mime_desktop_database_update; } pkg_postrm() { fdo-mime_desktop_database_update; } --------------070108000409000000040100--