On Sat, 2011-11-12 at 20:41:47 +0000, Martin Townsend wrote: > I have looked through the code some more and see that what I am > trying to do is wrong and that you need to find the pid with check. > The first pass of the schedule will send the SIGTERM. Then during > the schedule for timeout do_stop is called with a signal of 0 so > that the call to kill will check for the existence of the pid that > was retrieved from the pidfile.
Exactly. > This must be where it is failing for me, kill must be returning 0 > even though the pidfile has gone and ps --ef is showing that sshd > has a new process id. do_pidfile() should be caching the pid read initially. Something that comes to mind is that if the match options are not specific enough, let's say only --pidfile was used, there's the hypotetical problem of pid reuse, but openssh-server uses --exec too, and I doubt in your case the kernel has reused the sshd pid in that short time. > I'm running dpkg version 1.14.31 but I'll try the latest code and > step through it with gdb to try and shed some light on whats going > on. Starting with strace might give some fast clue, w/o the need of a full gdb session. > Could you point me to the git master and I'll check it out on Monday? $ git clone git://git.debian.org/git/dpkg/dpkg.git thanks, guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org