[vlc-devel] commit: Cache the --daemon value, so we remove the PID file iff we created it ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed May 7 16:56:27 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May  7 17:57:40 2008 +0300| [b16fe48fe68f59a62a2c7aa300adaf48d16fa909]

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b16fe48fe68f59a62a2c7aa300adaf48d16fa909
---

 src/libvlc-common.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libvlc-common.c b/src/libvlc-common.c
index 006396d..755f890 100644
--- a/src/libvlc-common.c
+++ b/src/libvlc-common.c
@@ -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 )




More information about the vlc-devel mailing list