rpms/timidity++/devel TiMidity++-2.13.2-fork-early.patch, NONE, 1.1 timidity++.spec, 1.32, 1.33
Hans de Goede
jwrdegoede at fedoraproject.org
Wed Jun 3 12:51:45 UTC 2009
Author: jwrdegoede
Update of /cvs/extras/rpms/timidity++/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1257
Modified Files:
timidity++.spec
Added Files:
TiMidity++-2.13.2-fork-early.patch
Log Message:
* Wed Jun 3 2009 Hans de Goede <hdegoede at redhat.com> 2.13.2-19
- Don't crash when started in daemon mode (with -iAD) (#501051)
TiMidity++-2.13.2-fork-early.patch:
--- NEW FILE TiMidity++-2.13.2-fork-early.patch ---
diff -up TiMidity++-2.13.2/interface/alsaseq_c.c~ TiMidity++-2.13.2/interface/alsaseq_c.c
--- TiMidity++-2.13.2/interface/alsaseq_c.c~ 2004-07-10 07:07:00.000000000 +0200
+++ TiMidity++-2.13.2/interface/alsaseq_c.c 2009-06-03 14:11:16.000000000 +0200
@@ -390,23 +390,6 @@ static void ctl_pass_playing_list(int n,
play_mode->close_output();
- if (ctl.flags & CTLF_DAEMONIZE)
- {
- int pid = fork();
- FILE *pidf;
- switch (pid)
- {
- case 0: // child is the daemon
- break;
- case -1: // error status return
- exit(7);
- default: // no error, doing well
- if ((pidf = fopen( "/var/run/timidity.pid", "w" )) != NULL )
- fprintf( pidf, "%d\n", pid );
- exit(0);
- }
- }
-
for (;;) {
server_reset();
doit(&alsactx);
diff -up TiMidity++-2.13.2/timidity/timidity.c~ TiMidity++-2.13.2/timidity/timidity.c
--- TiMidity++-2.13.2/timidity/timidity.c~ 2009-06-03 13:40:24.000000000 +0200
+++ TiMidity++-2.13.2/timidity/timidity.c 2009-06-03 14:12:20.000000000 +0200
@@ -5192,6 +5192,29 @@ MAIN_INTERFACE int timidity_post_load_co
{
int i, cmderr = 0;
+ /* If we're going to fork for daemon mode, we need to fork now, as
+ certain output libraries (pulseaudio) become unhappy if initialized
+ before forking and then being used from the child. */
+ if (ctl->id_character == 'A' && (ctl->flags & CTLF_DAEMONIZE))
+ {
+ int pid = fork();
+ FILE *pidf;
+ switch (pid)
+ {
+ case 0: // child is the daemon
+ break;
+ case -1: // error status return
+ exit(7);
+ default: // no error, doing well
+ if ((pidf = fopen( "/var/run/timidity.pid", "w" )) != NULL )
+ {
+ fprintf( pidf, "%d\n", pid );
+ fclose( pidf );
+ }
+ exit(0);
+ }
+ }
+
if(play_mode == &null_play_mode)
{
char *output_id;
Index: timidity++.spec
===================================================================
RCS file: /cvs/extras/rpms/timidity++/devel/timidity++.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- timidity++.spec 24 Mar 2009 10:29:39 -0000 1.32
+++ timidity++.spec 3 Jun 2009 12:51:14 -0000 1.33
@@ -1,7 +1,7 @@
Summary: A software wavetable MIDI synthesizer
Name: timidity++
Version: 2.13.2
-Release: 18%{?dist}
+Release: 19%{?dist}
Group: Applications/Multimedia
Source: http://downloads.sourceforge.net/timidity/TiMidity++-%{version}.tar.bz2
Source1: fedora-timidity.desktop
@@ -22,6 +22,7 @@ Patch14: TiMidity++-2.13.2-ipv6.patch
Patch15: TiMidity++-2.13.2-dynlibroot.patch
Patch16: TiMidity++-2.13.2-cfgfile-name.patch
Patch17: TiMidity++-2.13.2-missing-protos.patch
+Patch18: TiMidity++-2.13.2-fork-early.patch
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -57,6 +58,7 @@ sound card does not natively support wav
%patch15 -p1
%patch16 -p1
%patch17 -p1
+%patch18 -p1
%build
@@ -119,6 +121,9 @@ fi
%changelog
+* Wed Jun 3 2009 Hans de Goede <hdegoede at redhat.com> 2.13.2-19
+- Don't crash when started in daemon mode (with -iAD) (#501051)
+
* Tue Mar 24 2009 Hans de Goede <hdegoede at redhat.com> 2.13.2-18
- Require soundfont2-default virtual provides instead of hardcoding
PersonalCopy-Lite-soundfont (#491421)
More information about the fedora-extras-commits
mailing list