From marlon at supersnel.adsl.utwente.nl Tue Oct 9 14:50:42 2007 From: marlon at supersnel.adsl.utwente.nl (Marlon de Boer) Date: Tue Oct 9 14:44:18 2007 Subject: memcached posix threads and pidfile problem Message-ID: <470B9542.3040906@supersnel.adsl.utwente.nl> Hi list, I had some troubles running a threaded memcached with -P, see https://bugs.gentoo.org/show_bug.cgi?id=195248 for details. After looking at the source I noticed the writing of the pid happens after the daemon starts it threads, resulting in multiple threads wanting to write to the same file pointer. I've solved this with a patch 2672a2673 > save_pid(getpid(), pid_file); 2721,2723c2722 < /* save the PID in if we're a daemon */ < if (daemonize) < save_pid(getpid(), pid_file); --- > Kind regards, Marlon