http://gitweb.samba.org/?p=metze/samba/wip.git; a=shortlog; h=refs/heads/master4-double-fork

Andreas Schneider asn at samba.org
Wed Oct 27 05:15:11 MDT 2010


On Wednesday, October 27, 2010 10:23:54 Volker Lendecke wrote:
> On Wed, Oct 27, 2010 at 09:51:22AM +0200, Stefan (metze) Metzmacher wrote:
> > The goal was to avoid setting global signal handlers and to avoid
> > threads.
> > 
> > The solution I found (with help from Tridge) was to use a 2 staged
> > fork() in order to avoid generating SIGCHLD from the child.
> > At the same time the child should never endup as zombie.
> 
> Haven't looked at the code yet, but that is a *VERY* smart
> idea! The only downside I can see is that in ps output you
> might see tons of independent async helpers, the helper
> relationship is not obvious from the ppid anymore. But that
> is a minor issue that we can live with I think.

I think you can solve this on Linux using cgroups. systemd is using cgroups to 
track forks (double forks) and display them nicely.

http://www.mjmwired.net/kernel/Documentation/cgroups.txt


	-- andreas



More information about the samba-technical mailing list