[mednaffe] 35/99: Close file descriptor. Psx games don't freeze anymore on Linux. (Thanks to R. Danbrook for report it)

Stephen Kitt skitt at moszumanska.debian.org
Tue Aug 2 21:00:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch master
in repository mednaffe.

commit 797fcb291dc4844d2ffb10e10cb8d92189beed13
Author: amatcoder at gmail.com <amatcoder at gmail.com@44025b82-9115-564b-7d03-7f3fc60b4744>
Date:   Sat Dec 14 05:23:47 2013 +0000

    Close file descriptor. Psx games don't freeze anymore on Linux. (Thanks to R. Danbrook for report it)
---
 src/command.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/command.c b/src/command.c
index 8dca4a4..edd53f1 100644
--- a/src/command.c
+++ b/src/command.c
@@ -177,7 +177,7 @@ void child_watch(GPid pid, gint status, guidata *gui)
     }
   #endif
 
-  g_spawn_close_pid( pid );
+  g_spawn_close_pid(pid);
   gui->executing = FALSE;
 
   printf ("[Mednaffe] End of execution catched\n");
@@ -242,6 +242,7 @@ void row_exec(GtkTreeView *treeview, GtkTreePath *patho,
   else 
   {
     g_child_watch_add(pi.hProcess, (GChildWatchFunc)child_watch, gui);
+    CloseHandle(pi.hThread);
     gui->executing = TRUE;
     if (gui->state==1) gtk_window_iconify(GTK_WINDOW(gui->topwindow));
     if (gui->state==2) gtk_widget_hide(gui->topwindow);
@@ -275,6 +276,7 @@ void row_exec(GtkTreeView *treeview, GtkTreePath *patho,
 
   g_child_watch_add(pid, (GChildWatchFunc)child_watch, gui);
   out_ch = g_io_channel_unix_new(out);
+  g_io_channel_set_close_on_unref(out_ch, TRUE);
   g_io_add_watch(out_ch, G_IO_IN|G_IO_HUP, (GIOFunc)out_watch, gui);
   
   gui->executing = TRUE;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mednaffe.git



More information about the Pkg-games-commits mailing list