Make sure wallpaper and panel clean up dead children

This commit is contained in:
Kevin Lange 2014-05-10 20:09:16 -07:00
parent 913c4b004f
commit 4d310b3c03
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include <signal.h>
#include <sys/time.h>
#include <sys/utsname.h>
#include <sys/wait.h>
/* TODO: Move all of the configurable rendering
* parameters up here */
@ -515,6 +516,7 @@ static void * clock_thread(void * garbage) {
* so we can't just bail out of a yutani poll and redraw...
*/
while (_continue) {
waitpid(-1, NULL, WNOHANG);
redraw();
usleep(500000);
}

View File

@ -7,6 +7,7 @@
#include <assert.h>
#include <unistd.h>
#include <math.h>
#include <sys/wait.h>
#include "lib/yutani.h"
#include "lib/graphics.h"
@ -211,6 +212,7 @@ int main (int argc, char ** argv) {
while (_continue) {
yutani_msg_t * m = yutani_poll(yctx);
waitpid(-1, NULL, WNOHANG);
if (m) {
switch (m->type) {
case YUTANI_MSG_WINDOW_MOUSE_EVENT: