FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-04-2011, 12:44 PM
Alessio Ababilov
 
Default EasyTAG 2.1.6 Handle SIGCHLD to make audacious archived skins workable

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
--- 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 <sys/wait.h>
#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

# 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; }
 
Old 03-04-2011, 02:37 PM
Pacho Ramos
 
Default EasyTAG 2.1.6 Handle SIGCHLD to make audacious archived skins workable

El vie, 04-03-2011 a las 15:44 +0200, Alessio Ababilov escribió:
> 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

What about opening a bug report at bugs.gentoo.org?

Thanks :-)
 

Thread Tools




All times are GMT. The time now is 07:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org