summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-12-10 00:10:26 +0000
committersabetts <sabetts>2002-12-10 00:10:26 +0000
commit5921fddb61d19191a4e0d3e83c536593b9896a4a (patch)
treed50951028a6eae1f99c6419cac0fea061d2e5730
parentbc15e751d3b8538720e89848db8bfb9f6f636c20 (diff)
downloadratpoison-5921fddb61d19191a4e0d3e83c536593b9896a4a.zip
(spawn): only add DISPLAY to the environment if it
isn't already there.
-rw-r--r--ChangeLog5
-rw-r--r--src/actions.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4166099..ee96283 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-09 Shawn Betts <sabetts@sfu.ca>
+
+ * src/actions.c (spawn): only add DISPLAY to the environment if it
+ isn't already there.
+
2002-11-24 Shawn Betts <sabetts@sfu.ca>
* src/main.c: include sys/wait.h
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