[pulseaudio-commits] r1976 - /trunk/src/daemon/main.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Oct 29 08:33:08 PDT 2007


Author: lennart
Date: Mon Oct 29 16:33:07 2007
New Revision: 1976

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1976&root=pulseaudio&view=rev
Log:
use real path of binary instead of /proc/self/exe to execute ourselves

Modified:
    trunk/src/daemon/main.c

Modified: trunk/src/daemon/main.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/main.c?rev=1976&root=pulseaudio&r1=1975&r2=1976&view=diff
==============================================================================
--- trunk/src/daemon/main.c (original)
+++ trunk/src/daemon/main.c Mon Oct 29 16:33:07 2007
@@ -336,11 +336,14 @@
     */
 
     if (!getenv("LD_BIND_NOW")) {
-        putenv(pa_xstrdup("LD_BIND_NOW=1"));
+        char *rp;
 
         /* We have to execute ourselves, because the libc caches the
          * value of $LD_BIND_NOW on initialization. */
-        pa_assert_se(execv("/proc/self/exe", argv) == 0);
+
+        putenv(pa_xstrdup("LD_BIND_NOW=1"));
+        pa_assert_se(rp = pa_readlink("/proc/self/exe"));
+        pa_assert_se(execv(rp, argv) == 0);
     }
 #endif
 




More information about the pulseaudio-commits mailing list