Patch monado to allow graceful exit on Ctrl-C

This commit is contained in:
Patrick Nicolas
2024-04-02 17:59:59 +02:00
parent 7aa85dfa64
commit b9c4e04a14
3 changed files with 34 additions and 1 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ FetchContent_Declare(implot URL https://github.com/epezent/implot/archive
FetchContent_Declare(monado
GIT_REPOSITORY https://gitlab.freedesktop.org/monado/monado
GIT_TAG ffb71af26f8349952f5f820c268ee4774613e200
PATCH_COMMAND patch --forward -p1 < ${CMAKE_CURRENT_LIST_DIR}/patches/monado/0001-c-multi-disable-dropping-of-old-frames.patch || true
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${CMAKE_CURRENT_LIST_DIR}/patches/monado/
)
FetchContent_Declare(imgui
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
# There is no reliable way to apply a patch and succeed if it was
# already applied. Just ignore errors...
for f in "$@"/* ; do
patch -p1 --forward < "$f"
done
exit 0
@@ -0,0 +1,25 @@
From 289034b4c0721f348da99be047cf0e842e2dd2c9 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Tue, 2 Apr 2024 17:14:42 +0200
Subject: [PATCH 2/2] ipc/server: Always listen to stdin
---
src/xrt/ipc/server/ipc_server_mainloop_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xrt/ipc/server/ipc_server_mainloop_linux.c b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
index 97f1d2ca7..01552a8fe 100644
--- a/src/xrt/ipc/server/ipc_server_mainloop_linux.c
+++ b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
@@ -187,7 +187,7 @@ init_epoll(struct ipc_server_mainloop *ml)
struct epoll_event ev = {0};
- if (!ml->launched_by_socket && !debug_get_bool_option_skip_stdin()) {
+ if (!debug_get_bool_option_skip_stdin()) {
// Can't do this when launched by systemd socket activation by
// default.
// This polls stdin.
--
2.44.0