<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
+2008-06-11
+
+       * Fix -k to work with -d. (reported by Gary Zhu)
+
 2008-03-02 [Version 1.2.5-rc1 released]
 
        * Add per-item-class tracking of evictions and OOM errors (dormando)</diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -3004,6 +3004,17 @@ int main (int argc, char **argv) {
         }
     }
 
+    /* daemonize if requested */
+    /* if we want to ensure our ability to dump core, don't chdir to / */
+    if (daemonize) {
+        int res;
+        res = daemon(maxcore, settings.verbose);
+        if (res == -1) {
+            fprintf(stderr, &quot;failed to daemon() in order to daemonize\n&quot;);
+            return 1;
+        }
+    }
+
     /* lock paged memory if needed */
     if (lock_memory) {
 #ifdef HAVE_MLOCKALL
@@ -3033,18 +3044,6 @@ int main (int argc, char **argv) {
         }
     }
 
-    /* daemonize if requested */
-    /* if we want to ensure our ability to dump core, don't chdir to / */
-    if (daemonize) {
-        int res;
-        res = daemon(maxcore, settings.verbose);
-        if (res == -1) {
-            fprintf(stderr, &quot;failed to daemon() in order to daemonize\n&quot;);
-            return 1;
-        }
-    }
-
-
     /* initialize main thread libevent instance */
     main_base = event_init();
 </diff>
      <filename>memcached.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>031fab415ce7efbad450e4c3c0809f2df6313400</id>
    </parent>
  </parents>
  <author>
    <name>dormando</name>
    <email>dormando@b0b603af-a30f-0410-a34e-baf09ae79d0b</email>
  </author>
  <url>http://github.com/tmaesaka/memcached/commit/7391190f7ff652e662a490d4ca0409dc33fba283</url>
  <id>7391190f7ff652e662a490d4ca0409dc33fba283</id>
  <committed-date>2008-06-11T20:36:09-07:00</committed-date>
  <authored-date>2008-06-11T20:36:09-07:00</authored-date>
  <message>make -k work under daemon mode (-d).


git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@783 b0b603af-a30f-0410-a34e-baf09ae79d0b</message>
  <tree>8b3a1cfb5704429af1817404a3af2783b9e78544</tree>
  <committer>
    <name>dormando</name>
    <email>dormando@b0b603af-a30f-0410-a34e-baf09ae79d0b</email>
  </committer>
</commit>
