Daemonizing death under FreeBSD

Mahlon E. Smith mahlon@martini.nu
Mon, 20 Oct 2003 15:23:05 -0700


--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


Anyone else using memcached under FreeBSD and seeing this problem?

Foreground seems to work as expected. Adding the -d flags causes
memcached to crumple into a fetal position and die.

To see what was happening, I changed the 2nd arg to daemon() to a
non-zero value (1.18) and/or just used the -v flag under 1.19.

The error is this:
memcached: kevent: Bad file descriptor

I've verified with versions 1.19 and 1.18 under both 4.8-STABLE and
5.1-RELEASE - I can, of course, just use something like daemontools and
run this in the foreground without issue. (In fact, I prefer daemontools
anyway.) However, I'm curious that this hasn't been brought up before on
the list.

-Mahlon


Mahlon E. Smith                      jabber id: mahlon@chat.martini.nu
http://www.martini.nu/             get pgp key:  mahlon-pgp@martini.nu
......................................................................
             YOU HAVE BEEN KICKED OFF CHANNEL #BRITNEYFANZ

--NzB8fVQJ5HfG6fxh
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----

iD8DBQE/lGBJwL5r+zYGsmcRAmIHAJ46MIu7TRosgxbGZVAdEo/b/VETTgCgo5fK
4aO0NsD/Bub/gRM6vE3OHM4=
=t84o
-----END PGP SIGNATURE-----

--NzB8fVQJ5HfG6fxh--