-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 tags 414929 patch thanks
Steve Langasek wrote: > On Wed, Mar 21, 2007 at 11:10:48PM -0300, Henrique de Moraes Holschuh wrote: >> On Thu, 22 Mar 2007, Eddy Petri??or wrote: >>> Just a tired and blind attempt at this bug. >>> Could you patch the init script with the attached pacth and see if >>> it works? > >> --oknodo in stop is never acceptable, it is NOT OK if the daemon is there >> and we don't stop it. Thanks for the effort, anyway. > > That's not what --oknodo means. Please see the manpage; --oknodo is exactly > what's wanted here. Just to spare people from going to the manual: "If such a process does not exist, start-stop-daemon exits with error status 1 (0 if --oknodo is specified)" > > The only part of this patch that doesn't make sense is passing an explicit > --signal option, when it's the same as the default behavior. Yes, I should never send patches when I am tired :-) I was trying something along the lines of the code below. - - if start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \ - - --exec ${DAEMON} --retry 10 ; then + if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE} \ + --signal TERM/3/TERM/3/KILL/10; then Still I wasn't sure if it would make any difference to try to TERM twice and I ended up in sending a half baked/broken patch. Maybe is time to install timidity and check if I can reproduce the bug :-).... (after some time) So I went on and changed the command, and came up with a patch. I could reproduce the bug on my machine after uncommenting the option in /etc/default, and, of course the result was fine after applying the patch... >> In fact, that's how I'd fix this bug if I had the time right now. > > Does this mean you don't have time (even with a patch), and would like an > NMU? NMU patch attached. Below this line is not that relevant for this bug... - ---------------------- OTOH, Steve, you said that the --exec option should not be used, but I see the same type of code for many other daemons on my system, so the issue you are talking about should happen for these binaries, too, shouldn't it? Or am I missing something like most or all are calling that in a fuinction? (Went and tested a little) I tested on laptop-net's init script (well, its stop command) which also uses --exec and it seems the --exec parameter should be indeed avoided for --stop: bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# cp /usr/lib/laptop-net/ifd{,.a} bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# rm /usr/lib/laptop-net/ifd rm: remove regular file `/usr/lib/laptop-net/ifd'? y bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# ll /proc/`cat /var/run/ifd.pid`/exe lrwxrwxrwx 1 root root 0 2007-03-23 00:11 /proc/6401/exe -> /usr/lib/laptop-net/ifd (deleted) bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# start-stop-daemon --stop --oknodo --pidfile /var/run/ifd.pid --exec /usr/lib/laptop-net/ifd ; echo $? start-stop-daemon: stat /usr/lib/laptop-net/ifd: No such file or directory (No such file or directory) 2 bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# cp /usr/lib/laptop-net/ifd{.a,} bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# ps ax | grep ifd 6401 ? Ss 0:00 /usr/lib/laptop-net/ifd /usr/share/laptop-net/link-change eth0 6710 pts/5 R+ 0:00 grep ifd bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# ll /proc/`cat /var/run/ifd.pid`/exe lrwxrwxrwx 1 root root 0 2007-03-23 00:11 /proc/6401/exe -> /usr/lib/laptop-net/ifd (deleted) bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# start-stop-daemon --stop --oknodo --pidfile /var/run/ifd.pid ; echo $? 0 bounty:/home/eddy/usr/src/timidity/timidity-2.13.2/debian# ps ax | grep ifd 6729 pts/5 S+ 0:00 grep ifd - -- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGAwmfY8Chqv3NRNoRAntHAKDPSYL/Lue1OKZ6w5/6DRX1LOtaeQCfZaJV R5HYPxILh2n6tWwMRK6e4qE= =vfte -----END PGP SIGNATURE-----
diff -ruN timidity-2.13.2.old/debian/changelog timidity-2.13.2/debian/changelog --- timidity-2.13.2.old/debian/changelog 2007-03-23 00:45:23.000000000 +0200 +++ timidity-2.13.2/debian/changelog 2007-03-23 00:44:17.000000000 +0200 @@ -1,3 +1,12 @@ +timidity (2.13.2-7.3) unstable; urgency=high + + * Non-maintainer upload. + * urgency high since it fixes an RC bug + * do not fail if the daemon is not started and stop is attempted + (Closes: #414929) + + -- Eddy PetriÈor <[EMAIL PROTECTED]> Fri, 23 Mar 2007 00:42:59 +0200 + timidity (2.13.2-7.2) unstable; urgency=low * Non-maintainer upload with maintainer permission. diff -ruN timidity-2.13.2.old/debian/timidity.init timidity-2.13.2/debian/timidity.init --- timidity-2.13.2.old/debian/timidity.init 2007-03-23 00:45:23.000000000 +0200 +++ timidity-2.13.2/debian/timidity.init 2007-03-23 00:18:41.000000000 +0200 @@ -52,8 +52,8 @@ ;; stop) echo -n "Stopping $DESC: " - if start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \ - --exec ${DAEMON} --retry 10 ; then + if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE} \ + --retry 10 ; then echo "timidity." else echo "(failed)."