]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/commitdiff
Add another debug() print to init_from_environment().
authorSimon Ruderich <simon@ruderich.org>
Mon, 10 Jun 2013 20:25:31 +0000 (22:25 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 10 Jun 2013 20:25:31 +0000 (22:25 +0200)
src/trackfds.h

index 1eede800ddcd745f7e8eb1a4595157260bf74131..f84e20daee373c405c9b95642e4306232123245a 100644 (file)
@@ -95,6 +95,9 @@ static void init_from_environment(void) {
         errno = saved_errno;
         return;
     }
         errno = saved_errno;
         return;
     }
+#ifdef DEBUG
+    debug("  getenv(\"%s\"): \"%s\"\n", ENV_NAME_FDS, env);
+#endif
     /* Environment is read-only. */
     char env_copy[strlen(env) + 1];
     strcpy(env_copy, env);
     /* Environment is read-only. */
     char env_copy[strlen(env) + 1];
     strcpy(env_copy, env);
@@ -217,7 +220,7 @@ static void update_environment(void) {
     update_environment_buffer(env);
 
 #if 0
     update_environment_buffer(env);
 
 #if 0
-    debug("    setenv('%s', '%s', 1)\n", ENV_NAME_FDS, env);
+    debug("    setenv(\"%s\", \"%s\", 1)\n", ENV_NAME_FDS, env);
 #endif
 
     setenv(ENV_NAME_FDS, env, 1 /* overwrite */);
 #endif
 
     setenv(ENV_NAME_FDS, env, 1 /* overwrite */);