2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
15 bad_malloc(unsigned int size)
17 eprint("fatal: could not malloc() %u bytes\n", size);
23 emallocz(unsigned int size)
25 void *res = calloc(1, size);
33 eprint(const char *errstr, ...)
38 vfprintf(stderr, errstr, ap);
44 erealloc(void *ptr, unsigned int size)
46 void *res = realloc(ptr, size);
55 static char *shell = NULL;
57 if(!shell && !(shell = getenv("SHELL")))
65 close(ConnectionNumber(dpy));
67 execl(shell, shell, "-c", arg->cmd, NULL);
68 fprintf(stderr, "dwm: execl '%s -c %s'", shell, arg->cmd);