diff cinst/nssstore_linux.c @ 1060:317ee9dc4684

(issue46) Make debug output optional in cinst and mozilla and propagate its setting.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 09 Sep 2014 18:49:02 +0200
parents 78798d3af8f0
children e210ecc32d69
line wrap: on
line diff
--- a/cinst/nssstore_linux.c	Tue Sep 09 18:00:37 2014 +0200
+++ b/cinst/nssstore_linux.c	Tue Sep 09 18:49:02 2014 +0200
@@ -49,7 +49,7 @@
 {
   int pipe_fd[2];
   pid_t pid = 0;
-  char *argv[2] = {NULL, NULL},
+  char *argv[3] = {NULL, NULL, NULL},
                   *envp[2] = {NULL, NULL},
                              *inst_dir = NULL;
   size_t homedir_len = 0,
@@ -92,6 +92,11 @@
   exe_path_len = strlen(inst_dir) + strlen(NSS_PROCESS_NAME);
   argv[0] = xmalloc (exe_path_len + 1);
 
+  if (g_debug)
+    {
+      argv[1] = "--debug";
+    }
+
   ret = snprintf(argv[0], exe_path_len + 1, "%s%s", inst_dir, NSS_PROCESS_NAME);
   xfree (inst_dir);
   if (ret < 0 || (size_t) ret != exe_path_len)

http://wald.intevation.org/projects/trustbridge/