Libevent error 'Bad File Descriptor'

Sara Sioux sara@melodramatic.com
Wed, 22 Oct 2003 14:59:35 -0700


Thanks for the prompt responses!  Sorry if my questions are a little
low-brow, I'm not so great at system administration yet.  :)

What are the drawbacks to running memcached in the background, instead
of as a daemon?

Sara

-----Original Message-----
From: Brion Vibber [mailto:brion@pobox.com] 
Sent: Wednesday, October 22, 2003 2:53 PM
To: Sara Sioux; memcached@lists.danga.com
Subject: Re: Libevent error 'Bad File Descriptor'


On Wednesday, Oct 22, 2003, at 14:37 US/Pacific, Sara Sioux wrote:
> memcached -vv -d -m 512 -l 10.0.0.100 -p 1337
>
> It returns immediately with:
>
> <3 server listening
> memcached: kevent: Bad file descriptor
[snip]
> I'm attempting to install this on a FreeBSD 5.0-RELEASE-p4 system. Any

> help and suggestions would be HUGELY appreciated.

This seems to be related to how the open file descriptors get treated 
by the fork to a background process. I posted a workaround which seems 
to work on FreeBSD 5.1-RELEASE yesterday, by forking before doing 
anything substantive:
http://lists.danga.com/pipermail/memcached/2003-October/000304.html

Alternatively, you can just run it in the background without the -d 
option and it should work fine.

-- brion vibber (brion @ pobox.com)