Commit b16fe48f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Cache the --daemon value, so we remove the PID file iff we created it

parent 8764d2a1
...@@ -309,7 +309,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -309,7 +309,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* Check for daemon mode */ /* Check for daemon mode */
#ifndef WIN32 #ifndef WIN32
if( config_GetInt( p_libvlc, "daemon" ) ) if( config_GetInt( p_libvlc, "daemon" ) > 0 )
{ {
#ifdef HAVE_DAEMON #ifdef HAVE_DAEMON
char *psz_pidfile = NULL; char *psz_pidfile = NULL;
...@@ -1033,7 +1033,7 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release ) ...@@ -1033,7 +1033,7 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
#ifndef WIN32 #ifndef WIN32
char* psz_pidfile = NULL; char* psz_pidfile = NULL;
if( config_GetInt( p_libvlc, "daemon" ) > 0 ) if( b_daemon )
{ {
psz_pidfile = config_GetPsz( p_libvlc, "pidfile" ); psz_pidfile = config_GetPsz( p_libvlc, "pidfile" );
if( psz_pidfile != NULL ) if( psz_pidfile != NULL )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment