]> git.sesse.net Git - vlc/commitdiff
Cache the --daemon value, so we remove the PID file iff we created it
authorRémi Denis-Courmont <rem@videolan.org>
Wed, 7 May 2008 14:57:40 +0000 (17:57 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Wed, 7 May 2008 14:57:40 +0000 (17:57 +0300)
src/libvlc-common.c

index 006396da2ee8f227c91b99476b8f08956ea41ee9..755f8903dd86bcd5682b7304758b9b9903960d1e 100644 (file)
@@ -309,7 +309,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
     /* Check for daemon mode */
 #ifndef WIN32
-    if( config_GetInt( p_libvlc, "daemon" ) )
+    if( config_GetInt( p_libvlc, "daemon" ) > 0 )
     {
 #ifdef HAVE_DAEMON
         char *psz_pidfile = NULL;
@@ -1033,7 +1033,7 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
 #ifndef WIN32
     char* psz_pidfile = NULL;
 
-    if( config_GetInt( p_libvlc, "daemon" ) > 0 )
+    if( b_daemon )
     {
         psz_pidfile = config_GetPsz( p_libvlc, "pidfile" );
         if( psz_pidfile != NULL )