Fix warning in server/main.cpp

This commit is contained in:
Guillaume Meunier
2024-10-01 23:04:19 +02:00
parent d9b7bb29e1
commit b0a14033b6
+2 -1
View File
@@ -322,7 +322,8 @@ void kill_server()
// FIXME: server doesn't listen on stdin when used in socket activation mode
// Write to the server's stdin to make it quit
char buffer[] = "\n";
(void)write(stdin_pipe_fds[1], &buffer, strlen(buffer));
if (write(stdin_pipe_fds[1], &buffer, strlen(buffer)) < 0)
std::cerr << "Cannot stop monado properly." << std::endl;
// Send SIGTERM after 1s if it is still running
server_kill_watch = g_timeout_add(1000, [](void *) {