redhobor / transmisson-remote-gui

Automatically exported from code.google.com/p/transmisson-remote-gui
GNU General Public License v2.0
0 stars 0 forks source link

Transgui doesn't wait for xdg-open termination showing error and producing zombies #732

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a file or a folder containing the torrent's files.
2. A messagebox appears stating that open has failed though the file actually 
opens.
3. xdg-open leaves in zombie state.

What is the expected output? What do you see instead?
No error appears, xdg-open process is reaped.

What version of the product are you using? On what operating system?
5.0.1, Debian GNU/Linux amd64.

Please provide any additional information below.
Here's the fix, I hope it works as expected since I don't know FreePascal and 
only wrote on Delphi ages ago but read some docs on TProcess and this should do 
the trick:

Index: utils.pas
===================================================================
--- utils.pas   (revision 976)
+++ utils.pas   (working copy)
@@ -420,7 +420,7 @@

   WrkProcess:=TProcess.Create(nil);
   try
-    WrkProcess.Options:=[poNoConsole];
+    WrkProcess.Options:=[poNoConsole, poWaitOnExit];
     WrkProcess.CommandLine:=cmd + ' "' + fn + '"';
     WrkProcess.Execute;
     Result:=WrkProcess.ExitStatus;

Original issue reported on code.google.com by radioano...@gmail.com on 8 Jan 2014 at 12:29

GoogleCodeExporter commented 9 years ago
I didn't notice first but this fix isn't good enough. When I open the file, the 
main window freezes until I close the player (mpv in my case, a fork of 
mplayer2). So the entire procedure should work in a separate thread.

Original comment by radioano...@gmail.com on 14 Jan 2014 at 6:30

GoogleCodeExporter commented 9 years ago
Gentoo, 3.12.21-gentoo-r1, amd64.
I also have a dialog box with an error when opening a file or folder.

Original comment by f...@tavda.info on 8 Jul 2014 at 8:02