Browse Source

* Fixed backgrounding (must be done before creating controllers, bug ID #23445

git-svn-id: trunk@26697 -
michael 11 years ago
parent
commit
98dc27db1c
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/fcl-extra/src/unix/daemonapp.inc

+ 2 - 3
packages/fcl-extra/src/unix/daemonapp.inc

@@ -94,7 +94,8 @@ end;
 
 procedure TCustomDaemonApplication.SysStartRunDaemons;
 begin
-
+  if Application.HasOption('b','background') then
+    DaemonizeProgram;
 end;
 
 procedure TCustomDaemonApplication.SysEndRunDaemons;
@@ -104,8 +105,6 @@ Var
   DC : TDaemonController;
   
 begin
-  if Application.HasOption('b','background') then
-    DaemonizeProgram;
   For I:=ComponentCount-1 downto 0 do
     If Components[i] is TDaemoncontroller then
       begin