summaryrefslogtreecommitdiff
path: root/chat/jabberd/patches/patch-ac
blob: 0e96d9558e7bff3b8e4c8641158b68ffcfd8fd66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-ac,v 1.2 2004/02/21 05:38:29 xtraeme Exp $

--- jabberd/jabberd.c.orig	2003-12-19 12:17:00.000000000 +0000
+++ jabberd/jabberd.c	2003-12-19 12:17:52.000000000 +0000
@@ -199,15 +199,6 @@
     if(home != NULL && chdir(home))
         fprintf(stderr,"Unable to access home folder %s: %s\n",home,strerror(errno));
 
-    /* background ourselves if we have been flagged to do so */
-    if(do_background != 0)
-    {
-        if (fork() != 0)
-        {
-            exit(0);
-        }
-    }
-
     /* load the config passing the file if it was manually set */
     cfgfile=ghash_get(cmd__line,"c");
     if(configurate(cfgfile))
@@ -234,6 +225,15 @@
     dynamic_init();
     deliver_init();
 
+    /* background ourselves if we have been flagged to do so */
+    if(do_background != 0)
+    {
+        if (fork() != 0)
+        {
+            exit(0);
+        }
+    }
+
     /* everything should be registered for the config pass, validate */
     deliver__flag = 0; /* pause deliver() while starting up */
     if(configo(0))