From: John Kelly on

The daemon helper 2010-06-04

Now it calls initgroups() when root uses the "set user" -u option. This
was not necessary with an old kernel I was using, but on newer kernels,
setuid() does not automatically initialize the supplementary groups. So
says the opengroup:

http://www.opengroup.org/onlinepubs/000095399/functions/setuid.html


Targeted at Linux and written in C, the daemon helper starts any program
or script as a daemon.

Why not write your own, using the many source code examples on the web?
Well, for one thing, it's hard to think of everything that can go wrong.
I've spent time discovering various pitfalls, so you don't have to.

Tediously, I check the return value of every syscall and library call,
and report failure for unexpected conditions. The error messages *are*
the documentation for the source code. If you think the source is not
commented, read the error messages. They explain what's going on.

http://www.beewyz.com/~jar/etcetera/computer/programming/project/dh/



--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php