[Stgt-devel] [PATCH] in tgt-setup-lun: fix check if tgtd daemon is running

FUJITA Tomonori fujita.tomonori
Mon Apr 7 04:12:17 CEST 2008


On Sun, 06 Apr 2008 09:56:49 +0300
Doron Shoham <dorons at Voltaire.COM> wrote:

> FUJITA Tomonori wrote:
> > On Tue, 01 Apr 2008 17:31:05 +0300
> > Doron Shoham <dorons at voltaire.com> wrote:
> > 
> >> Checking if the tgtd daemon is running should be
> >> done with pidof
> >>
> >> Signed-off-by: Doron Shoham <dorons at voltaire.com>
> >> ---
> >>  scripts/tgt-setup-lun |   13 ++++++++-----
> >>  1 files changed, 8 insertions(+), 5 deletions(-)
> > 
> > Thanks, looks nice.
> > 
> > But the old script checks there are two tgtd daemons running. The new
> > one doesn't. Can you improve the new one to do that?
> 
> Why tgtd has two daemons (process)?

One daemon does only logging and another (the main daemon) does the
rest. Two daemons use shared memory.


> When running tgtd with -f flag it has only one process,
> why is it?

It's just for debugging.


> So if I'll check for two process the script will exit.
> 
> > 
> > Note that one of the two tgtd daemons could die due to a bug.
> When does it happen?

It happens when we put a bug to the main daemon.



More information about the stgt mailing list