Merge pull request #1295 from ZoneMinder/zmdc_better_error_messages
include the sock path in the error message and output an error on fai…
This commit is contained in:
commit
5f771327be
|
@ -250,13 +250,15 @@ sub run
|
||||||
{
|
{
|
||||||
print( $PID $$ );
|
print( $PID $$ );
|
||||||
close( $PID );
|
close( $PID );
|
||||||
|
} else {
|
||||||
|
Error( "Can't open pid file at " . ZM_PID );
|
||||||
}
|
}
|
||||||
|
|
||||||
killAll( 1 );
|
killAll( 1 );
|
||||||
|
|
||||||
socket( SERVER, PF_UNIX, SOCK_STREAM, 0 ) or Fatal( "Can't open socket: $!" );
|
socket( SERVER, PF_UNIX, SOCK_STREAM, 0 ) or Fatal( "Can't open socket: $!" );
|
||||||
unlink( main::SOCK_FILE );
|
unlink( main::SOCK_FILE ) or Error( "Unable to unlink " . main::SOCK_FILE );
|
||||||
bind( SERVER, $saddr ) or Fatal( "Can't bind: $!" );
|
bind( SERVER, $saddr ) or Fatal( "Can't bind to " . main::SOCK_FILE . ": $!" );
|
||||||
listen( SERVER, SOMAXCONN ) or Fatal( "Can't listen: $!" );
|
listen( SERVER, SOMAXCONN ) or Fatal( "Can't listen: $!" );
|
||||||
|
|
||||||
$SIG{CHLD} = \&reaper;
|
$SIG{CHLD} = \&reaper;
|
||||||
|
|
Loading…
Reference in New Issue