miwm (1.1-3) 40-change-bash-to-sh.patch

Summary

 ops.cc |    3 ++-
 wm.cc  |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

From ddb4193d88fb23e5f7e7416cd403be33875583b0 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Tue, 29 Dec 2009 19:31:10 +0200
Subject: [PATCH] Use /bin/sh

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 ops.cc |    3 ++-
 wm.cc  |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ops.cc b/ops.cc
index 2989b80..0b8b723 100644
--- a/ops.cc
+++ b/ops.cc
@@ -253,8 +253,9 @@ void retileWS() {
 
 void restartWM() {
   char* sh = ((char*) getenv("SHELL"));
+  char default_sh[] = "/bin/sh";
   if (sh == 0)
-    sh = "/bin/bash"; 
+      sh = default_sh;
   int rslt = fork();
   switch (rslt) {
   case 0:  // child
diff --git a/wm.cc b/wm.cc
index fdcacd5..fc02045 100644
--- a/wm.cc
+++ b/wm.cc
@@ -376,9 +376,11 @@ WindowManager::undoFullPreview(Client *pc) {
 void
 WindowManager::spawn(char *command) {
   char* sh = ((char*) getenv("SHELL"));
+  char default_sh[] = "/bin/sh";
+
 //   char *displayName = DisplayString(dpy);
   if (sh == 0)
-    sh = "/bin/bash"; 
+    sh = default_sh;
 
 //   cout << "SHELL is " << sh << endl;
 
-- 
1.6.5