Introduction
Introduction Statistics Contact Development Disclaimer Help
Fixing the symlink and shortening exec. - thinglaunch - A simple command and pa…
git clone git://bitreich.org/thinglaunch
Log
Files
Refs
Tags
LICENSE
---
commit c13c797ba4f26cdbff560020a815fea564d8c60b
parent 5502b4594bac02c6091df6479aad7e9f7a754899
Author: Christoph Lohmann <[email protected]>
Date: Sun, 27 Mar 2011 20:53:31 +0200
Fixing the symlink and shortening exec.
Diffstat:
M Makefile | 2 +-
M thinglaunch.c | 9 +--------
2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -28,7 +28,7 @@ ${OBJ}: config.mk
${NAME}: ${OBJ}
@echo CC -o $@
@${CC} -o $@ ${OBJ} ${LDFLAGS}
- @[ ! -e thingaskpass ] && ln -s ${NAME} thingaskpass
+ @ln -s ${NAME} thingaskpass 2>/dev/null; true
clean:
@echo cleaning
diff --git a/thinglaunch.c b/thinglaunch.c
@@ -433,7 +433,6 @@ void
execcmd(void)
{
char *shell;
- char *argv[4];
XDestroyWindow(dpy, win);
@@ -455,14 +454,8 @@ execcmd(void)
if (!shell)
shell = "/bin/sh";
- argv[0] = basename(shell);
- argv[1] = "-c";
- argv[2] = cbuf;
- argv[3] = NULL;
-
- execv(shell, argv);
+ execlp(shell, basename(shell), "-c", cbuf, (char *)NULL);
die("aiee, after exec");
-
}
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.