-/* $OpenBSD: environ.c,v 1.14 2016/07/15 09:28:32 nicm Exp $ */
+/* $OpenBSD: environ.c,v 1.15 2016/07/15 09:52:34 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
/* Log the environment. */
void
-environ_log(struct environ *env)
+environ_log(struct environ *env, const char *prefix)
{
struct environ_entry *envent;
- RB_FOREACH(envent, environ, env)
- log_debug("%s=%s", envent->name, envent->value);
+ RB_FOREACH(envent, environ, env) {
+ if (envent->value != NULL && *envent->name != '\0') {
+ log_debug("%s%s=%s", prefix, envent->name,
+ envent->value);
+ }
+ }
}
-/* $OpenBSD: tmux.h,v 1.639 2016/07/15 09:28:32 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.640 2016/07/15 09:52:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
void environ_unset(struct environ *, const char *);
void environ_update(const char *, struct environ *, struct environ *);
void environ_push(struct environ *);
-void environ_log(struct environ *);
+void environ_log(struct environ *, const char *);
/* tty.c */
void tty_create_log(void);
-/* $OpenBSD: window.c,v 1.164 2016/07/15 09:28:32 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.165 2016/07/15 09:52:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
log_debug("spawn: %s -- %s", wp->shell, cmd);
for (i = 0; i < wp->argc; i++)
log_debug("spawn: argv[%d] = %s", i, wp->argv[i]);
- environ_log(env);
+ environ_log(env, "spawn: ");
memset(&ws, 0, sizeof ws);
ws.ws_col = screen_size_x(&wp->base);