]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/start-child.c
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / start-child.c
index b3bce1317e3419d83b9bf988b37848cca2556d67..7f55d4e297efa7a3c40e662dbe3b6e0ecb9be9e9 100644 (file)
 
 #include <pulsecore/core-util.h>
 #include <pulsecore/core-error.h>
+#include <pulsecore/pipe.h>
 
 #include "start-child.h"
 
 int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid) {
+#ifdef HAVE_FORK
     pid_t child;
     int pipe_fds[2] = { -1, -1 };
 
@@ -86,6 +88,11 @@ int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid) {
         pa_reset_sigs(-1);
         pa_unblock_sigs(-1);
         pa_reset_priority();
+        pa_unset_env_recorded();
+
+        /* Make sure our children are not influenced by the
+         * LD_BIND_NOW we set for ourselves. */
+        unsetenv("LD_BIND_NOW");
 
 #ifdef PR_SET_PDEATHSIG
         /* On Linux we can use PR_SET_PDEATHSIG to have the helper
@@ -102,6 +109,7 @@ int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid) {
 
 fail:
     pa_close_pipe(pipe_fds);
+#endif /* HAVE_FORK */
 
     return -1;
 }