Browse Source

Close pipe in Wayland_ShowMessageBox

When closing message box by pressing escape, Zenity does not write to the pipe and fgets() get stuck waiting for EOF.
Mathieu Eyraud 2 năm trước cách đây
mục cha
commit
cac1434295
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/video/wayland/SDL_waylandmessagebox.c

+ 1 - 0
src/video/wayland/SDL_waylandmessagebox.c

@@ -212,6 +212,7 @@ int Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *button
         FILE *outputfp = NULL;
         char *output = NULL;
         char *tmp = NULL;
+        close(fd_pipe[1]);
 
         if (!buttonID) {
             /* if we don't need buttonID, we can return immediately */