]> err.no Git - varnish/commit
Don my plumbers outfit and twist a lot of pipes into shape:
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 2 Aug 2006 13:28:14 +0000 (13:28 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 2 Aug 2006 13:28:14 +0000 (13:28 +0000)
commit8329b5cffd99ad3d0942cb0753e705be83e1f618
tree925785b8f4c82b59905817ee59d078bc1078e55e
parentace2d583a723d8adfd463bef4e49368af6a3f4fa
Don my plumbers outfit and twist a lot of pipes into shape:

When -d(ebug) is specified we fork before calling daemon.

The parent process becomes a miniature cat(1) program which connects
stdin/stdout with the management process stdin/stdout.

It also knows that SIGINT should be passed on to the management process
in order to make it DTRT.

Any other cause of death for this "debugger" process will (once I
teach the CLI about it) not affect the running varnish and therefore
it will be possible to start varnish in debugging mode, tweak things
a bit and CTRL-D and leave it running in the properly daemon(3)'ed
background.

The reason for this rather complicated bit of pipework is that we
can not call daemon(3) once we have started any threads (only the
calling thread survives) and we would loose our parent relationship
to the cache process also.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@604 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/mgt_child.c
varnish-cache/bin/varnishd/varnishd.c