/* * (C)opyright MMIV-MMVI Anselm R. Garbe * See LICENSE file for license details. */ #include #include #include #include #include "wm.h" void spawn(char *cmd) { if(fork() == 0) { if(fork() == 0) { setsid(); close(ConnectionNumber(dpy)); execlp("rc", "rc", "-c", cmd, (char *) 0); perror("failed"); exit(1); } exit(0); } wait(0); }