xserver: Create per-display log file

dev
Kristian Høgsberg 14 years ago
parent 6244668cc5
commit d6520e144a
  1. 6
      compositor/xserver-launcher.c

@ -453,7 +453,7 @@ static int
wlsc_xserver_handle_event(int listen_fd, uint32_t mask, void *data) wlsc_xserver_handle_event(int listen_fd, uint32_t mask, void *data)
{ {
struct wlsc_xserver *mxs = data; struct wlsc_xserver *mxs = data;
char display[8], s[8]; char display[8], s[8], logfile[32];
int sv[2], flags; int sv[2], flags;
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv) < 0) { if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv) < 0) {
@ -474,6 +474,8 @@ wlsc_xserver_handle_event(int listen_fd, uint32_t mask, void *data)
setenv("WAYLAND_SOCKET", s, 1); setenv("WAYLAND_SOCKET", s, 1);
snprintf(display, sizeof display, ":%d", mxs->display); snprintf(display, sizeof display, ":%d", mxs->display);
snprintf(logfile, sizeof logfile,
"/tmp/x-log-%d", mxs->display);
if (execl("/usr/bin/Xorg", if (execl("/usr/bin/Xorg",
"/usr/bin/Xorg", "/usr/bin/Xorg",
@ -481,7 +483,7 @@ wlsc_xserver_handle_event(int listen_fd, uint32_t mask, void *data)
"-wayland", "-wayland",
"-rootless", "-rootless",
"-retro", "-retro",
"-logfile", "/tmp/foo", "-logfile", logfile,
"-nolisten", "all", "-nolisten", "all",
"-terminate", "-terminate",
NULL) < 0) NULL) < 0)

Loading…
Cancel
Save