diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-01-19 17:33:56 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-01-19 17:33:56 +0000 |
commit | 7439d23e40a881b74ced2b0edf6bedea894cd613 (patch) | |
tree | f298dd7373e3e41661bdd83f2378a7154044f46b /media-sound | |
parent | Added mips to keywords (diff) | |
download | historical-7439d23e40a881b74ced2b0edf6bedea894cd613.tar.gz historical-7439d23e40a881b74ced2b0edf6bedea894cd613.tar.bz2 historical-7439d23e40a881b74ced2b0edf6bedea894cd613.zip |
add SIGTERM and SIGINT handler; but #13604
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/xmms/ChangeLog | 5 | ||||
-rw-r--r-- | media-sound/xmms/files/xmms-sigterm.patch | 30 | ||||
-rw-r--r-- | media-sound/xmms/xmms-1.2.7-r18.ebuild | 7 |
3 files changed, 39 insertions, 3 deletions
diff --git a/media-sound/xmms/ChangeLog b/media-sound/xmms/ChangeLog index 6dc744f9351e..f225a640bf1f 100644 --- a/media-sound/xmms/ChangeLog +++ b/media-sound/xmms/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for media-sound/xmms # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/media-sound/xmms/ChangeLog,v 1.38 2002/12/27 22:19:36 raker Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/xmms/ChangeLog,v 1.39 2003/01/19 17:33:56 azarah Exp $ + + 19 Jan 2003; Martin Schlemmer <azarah@gentoo.org> xmms-1.2.7-r18.ebuild : + Add patch to save playlist, etc on SIGTERM and SIGINT, bug #13604. *xmms-1.2.7-r18 (27 Dec 2002) diff --git a/media-sound/xmms/files/xmms-sigterm.patch b/media-sound/xmms/files/xmms-sigterm.patch new file mode 100644 index 000000000000..af04b04bfb12 --- /dev/null +++ b/media-sound/xmms/files/xmms-sigterm.patch @@ -0,0 +1,30 @@ +--- xmms-1.2.7/xmms/main.c 2003-01-09 23:14:04.000000000 +0100 ++++ xmms-1.2.7/xmms/main-exit.c 2003-01-09 23:13:53.000000000 +0100 +@@ -3257,6 +3257,18 @@ + exit(1); + } + ++/* Try to exit nicely when receiving a nice exit signal */ ++void sigterm_handler(int sig) ++{ ++ /* Original author of patch said that you should not use mainwin_quit_cb(), ++ * but his way deadlock xmms, and it anyhow just calls ctrlsocket stuff with ++ * with CMD_QUIT, which anyhow calls mainwin_quit_cb() in turn. This is not ++ * entirely clean, but works. ++ * <azarah@gentoo.org> (19 Jan 2003) ++ xmms_remote_quit(ctrlsocket_get_session_id()); */ ++ mainwin_quit_cb(); ++} ++ + static gboolean pposition_configure(GtkWidget *w, GdkEventConfigure *event, gpointer data) + { + gint x,y; +@@ -3387,6 +3393,8 @@ + #endif + + signal(SIGPIPE, SIG_IGN); /* for controlsocket.c */ ++ signal(SIGTERM, sigterm_handler); ++ signal(SIGINT, sigterm_handler); + signal(SIGSEGV, segfault_handler); + g_thread_init(NULL); + if (!g_thread_supported()) diff --git a/media-sound/xmms/xmms-1.2.7-r18.ebuild b/media-sound/xmms/xmms-1.2.7-r18.ebuild index 74b8d8981f71..51b55a6b52a0 100644 --- a/media-sound/xmms/xmms-1.2.7-r18.ebuild +++ b/media-sound/xmms/xmms-1.2.7-r18.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/xmms/xmms-1.2.7-r18.ebuild,v 1.1 2002/12/27 22:19:36 raker Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/xmms/xmms-1.2.7-r18.ebuild,v 1.2 2003/01/19 17:33:56 azarah Exp $ IUSE="xml nls esd gnome opengl mmx oggvorbis 3dnow mikmod directfb ipv6" @@ -40,6 +40,9 @@ src_unpack() { # Patch to allow external programmes to have the "jump to" dialog box epatch ${FILESDIR}/xmms-jump.patch + # Save playlist, etc on SIGTERM and SIGINT, bug #13604. + epatch ${FILESDIR}/xmms-sigterm.patch + # The following optimisations are ONLY for x86 platform use x86 && ( \ # For mmx/3dnow enabled CPUs, this patch adds mmx/3dnow optimisations @@ -82,7 +85,7 @@ src_unpack() { cd ${x} aclocal export WANT_AUTOCONF_2_5=1 - automake --gnu --include-deps Makefile || die + automake --gnu --add-missing --include-deps Makefile || die autoconf || die done } |