[Box Backup-dev] Question about bbstored pid
James O'Gorman
boxbackup-dev@fluffy.co.uk
Sat, 30 Jun 2007 23:53:00 +0100
On Sat, Jun 30, 2007 at 11:34:04PM +0100, Chris Wilson wrote:
> Hi James,
>
> > I'm trying to extend the test suite to ensure that all bbstored processes
> > are killed off if they haven't terminated at the end of the test.
>
> chris/merge already does this, you can probably just copy the code from
> infrastructure/makebuildenv.pl.in. (where it creates "t" and "t-gdb")
Ah, sorry, I missed that! Is Perl's kill() portable? I was going to use
kill(1) for Unix and a WMI script for Windows.
> > When I './runtest.pl backupstore debug', I see a bbstored.pid file created
> > in debug/test/backupstore/testfiles/bbstored.pid, but 'pgrep bbstored'
> > shows more than one process (the main bbstored, a housekeeping process and
> > any client connections).
> >
> > Are the other processes just forks of what's in bbstored.pid, and would
> > just killing off that process kill all others?
>
> Yes, they are forks from the main process. Killing the main one will kill
> the housekeeping process as well, and the rest will die when you kill any
> bbackupd/bbackupquery processes that are connected to them.
Great, thanks.
I think I'll delve into your branch a bit further so I don't step on any
more toes :-)
James