summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2014-01-22 22:26:06 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2014-01-22 22:26:06 +0000
commite599de0042411257d7188c78a53f84d8df318c80 (patch)
tree97c9928a24064bc097395aaecce54be5c1af5787 /app
parent77695961d2e9af5a2441d42154e8be3e75de485b (diff)
cwm_argv doesn't need to be global any longer
Diffstat (limited to 'app')
-rw-r--r--app/cwm/calmwm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/cwm/calmwm.c b/app/cwm/calmwm.c
index e5ef9275f..9faf7b666 100644
--- a/app/cwm/calmwm.c
+++ b/app/cwm/calmwm.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.c,v 1.85 2014/01/22 22:14:02 okan Exp $
+ * $OpenBSD: calmwm.c,v 1.86 2014/01/22 22:26:05 okan Exp $
*/
#include <sys/param.h>
@@ -35,7 +35,6 @@
#include "calmwm.h"
-char **cwm_argv;
Display *X_Dpy;
Time Last_Event_Time = CurrentTime;
Atom cwmh[CWMH_NITEMS];
@@ -52,7 +51,7 @@ volatile sig_atomic_t cwm_status;
static void sigchld_cb(int);
static int x_errorhandler(Display *, XErrorEvent *);
static void x_init(const char *);
-static void x_restart(void);
+static void x_restart(char **);
static void x_teardown(void);
static int x_wmerrorhandler(Display *, XErrorEvent *);
@@ -61,6 +60,7 @@ main(int argc, char **argv)
{
const char *conf_file = NULL;
char *conf_path, *display_name = NULL;
+ char **cwm_argv;
int ch;
struct passwd *pw;
@@ -118,7 +118,7 @@ main(int argc, char **argv)
xev_process();
x_teardown();
if (cwm_status == CWM_RESTART)
- x_restart();
+ x_restart(cwm_argv);
return (0);
}
@@ -147,10 +147,10 @@ x_init(const char *dpyname)
}
static void
-x_restart(void)
+x_restart(char **args)
{
(void)setsid();
- (void)execvp(cwm_argv[0], cwm_argv);
+ (void)execvp(args[0], args);
}
static void