Xinqi Bao's Git
99d7bebb773c42658a79032ba566986f54d401dc
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
15 badmalloc(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
);