Double-fork for xwayland execution

The intermediate fork needs to wait for SIGUSR1 for when Xserver is
ready, or SIGCHLD if the exec didn't work out.

Also change the exit() to _exit() as that is apparently more appropriate
for forks (and waitpid's status was wrong without it for some reason)

Fixes #122.
This commit is contained in:
Dominique Martinet 2017-08-26 18:10:57 +02:00
parent 2f5ff45039
commit 871646d225
2 changed files with 59 additions and 26 deletions

View file

@ -1,7 +1,6 @@
#ifndef _WLR_XWAYLAND_H
#define _WLR_XWAYLAND_H
#include <time.h>
#include <sys/types.h>
#include <stdbool.h>
#include <wlr/types/wlr_compositor.h>
#include <xcb/xcb.h>