When stopping timidity via "/etc/init.d/timidity stop" the process will still ahng around, as it needs to be terminated via SIGKILL. This is at least true for timidity++ 2.13.0_rc2 when timidity is configured as alsa client (-iA). The new line could look like: start-stop-daemon --stop -s 9 --quiet --pidfile /var/run/timidity.pid Reproducible: Always Steps to Reproduce: 1. /etc/init.d/timidity start 2. /etc/init.d/timidity stop 3. ps ax |grep timidity Actual Results: timidity was still running Expected Results: exited ;-)
(00:47:46 Tue Apr 20 2004 root@eradicator) ~ $ /etc/init.d/timidity start * WARNING: "timidity" has already been started. (00:47:51 Tue Apr 20 2004 root@eradicator) ~ $ ps x | grep timidity 4244 root ? 30 0 S 0.0 0.1 Apr 12 00:00:03 /usr/bin/timidity -iA -B2,8 -Os -EFreverb=0 17830 root pts/4 28 0 S 0.0 0.0 00:47:55 00:00:00 grep timidity (00:47:56 Tue Apr 20 2004 root@eradicator) ~ $ /etc/init.d/timidity sta (00:47:58 Tue Apr 20 2004 root@eradicator) ~ $ cat /var/run/timidity.pid 4244 (00:48:02 Tue Apr 20 2004 root@eradicator) ~ $ /etc/init.d/timidity stop * Stopping Timidity... [ ok ] (00:48:06 Tue Apr 20 2004 root@eradicator) ~ $ cat /var/run/timidity.pid 4244 (00:48:08 Tue Apr 20 2004 root@eradicator) ~ $ ps x | grep timidity 17968 root pts/4 26 0 S 0.0 0.0 00:48:10 00:00:00 grep timidity
You didn't report what version of timidity++ you are using, and as it isn't working for me, it's probably the failsafe solution to use sigkill. Otherwise it's a major pain because software suspend won't be able to freeze the process, so you have to abort suspend, kill the timidity process, suspend again ;-) Just my argument: Adding -s 9 will solve my problem and won't break it for anyone else.
I have media-sound/timidity++-2.13.0_rc2, just like you... do you have something using the sequencer that might be preventing the exit? What are your CFLAGS? Maybe some heavy optimization is messing with the signal handler in timidity++... try '-O2 -pipe'...
I won't "fix" this unless it is reported by other people as it works for me. sending SIGKILL should be a last resort, and you needing to send SIGKILL shows that something else is going wrong...