From 5921fddb61d19191a4e0d3e83c536593b9896a4a Mon Sep 17 00:00:00 2001 From: sabetts Date: Tue, 10 Dec 2002 00:10:26 +0000 Subject: (spawn): only add DISPLAY to the environment if it isn't already there. --- src/actions.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/actions.c b/src/actions.c index d02a983..bdb2b76 100644 --- a/src/actions.c +++ b/src/actions.c @@ -980,7 +980,10 @@ spawn(void *data) { /* Some process setup to make sure the spawned process runs in its own session. */ - putenv(current_screen()->display_string); + /* Only put the display env if we don't have it already. If we + don't do this it core dumps on FreeBSD. */ + if (!getenv("DISPLAY")) + putenv(current_screen()->display_string); #ifdef HAVE_SETSID setsid(); #endif -- cgit v1.2.3