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

Stefan (metze) Metzmacher metze at samba.org
Wed Oct 27 01:51:22 MDT 2010


Hi,

during the Storage Developer Conference 2010 I researched how we can
implement helper processes in library code.

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.

My first implementation is available here:
http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-double-fork

It passes our autobuild tests, but I want to do some more testing before
pushing
it to master.

It would be nice to get some comments.

The double_fork() function could be the basis for some really useful
higher level
async functions. We could use it to implement fully async wrappers for
libraries
like gssapi, cups and others, which have no native way to plug into our
tevent library.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101027/6f10743d/attachment.pgp>


More information about the samba-technical mailing list