xiwm

simple window manager
git clone https://git.ce9e.org/xiwm.git

commit
2991a5981a55b47b6f1921c5c46fdcc7d2da9423
parent
960ae38f7625f023df1f61e2f8aa41f90e99c29d
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-10-17 05:45
simplify spawn

Diffstat

M xiwm.c 15 ++++++---------

1 files changed, 6 insertions, 9 deletions


diff --git a/xiwm.c b/xiwm.c

@@ -810,15 +810,12 @@ killclient(const Arg *arg)
  810   810 void
  811   811 spawn(const Arg *arg)
  812   812 {
  813    -1 	if (fork() == 0) {
  814    -1 		if (dpy)
  815    -1 			close(ConnectionNumber(dpy));
  816    -1 		setsid();
  817    -1 		execvp(((char **)arg->v)[0], (char **)arg->v);
  818    -1 		fprintf(stderr, "xiwm: execvp %s", ((char **)arg->v)[0]);
  819    -1 		perror(" failed");
  820    -1 		exit(EXIT_SUCCESS);
  821    -1 	}
   -1   813 	if (fork())
   -1   814 		return;
   -1   815 	if (dpy)
   -1   816 		close(ConnectionNumber(dpy));
   -1   817 	setsid();
   -1   818 	execvp(((char **)arg->v)[0], (char **)arg->v);
  822   819 }
  823   820 
  824   821 /* main */