Reinitialise logs to allow database output after fork.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3465 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2011-06-24 09:04:32 +00:00
parent 60cd56569e
commit 88da162112
1 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ if ( !$server_up )
if ( my $cpid = fork() ) if ( my $cpid = fork() )
{ {
logInit(); logReinit();
# Parent process just sleep and fall through # Parent process just sleep and fall through
socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or die( "Can't open socket: $!" ); socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or die( "Can't open socket: $!" );
@ -150,7 +150,7 @@ if ( !$server_up )
setpgrp(); setpgrp();
logInit(); logReinit();
Info( "Control server $id/$protocol starting at ".strftime( '%y/%m/%d %H:%M:%S', localtime() ) ); Info( "Control server $id/$protocol starting at ".strftime( '%y/%m/%d %H:%M:%S', localtime() ) );