[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.7-792-gf356993

? sunnavy sunnavy at bestpractical.com
Fri Dec 10 04:40:36 EST 2010


The branch, 3.9-trunk has been updated
       via  f35699355a69f07fc1ef2f3345b89ce2fa73ad11 (commit)
      from  27596f6eb412bb824a2103f0f9b5531bd78ab167 (commit)

Summary of changes:
 sbin/rt-server.in |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit f35699355a69f07fc1ef2f3345b89ce2fa73ad11
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Dec 10 17:24:58 2010 +0800

    disconnect DB before fork, or threads will cry if used.
    
    without this we may get error like:
    handle 2 is owned by thread 7f88d8d20680 not current thread 7f88d1286080
    (handles can't be shared between threads and your driver may need a CLONE method added)

diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index 5ba55db..6070a0b 100755
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -128,6 +128,10 @@ EOF
     }
 }
 
+# we must disconnect DB before fork
+$RT::Handle->dbh(undef);
+undef $RT::Handle;
+
 require RT::Interface::Web::Handler;
 my $app = RT::Interface::Web::Handler->PSGIApp;
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list