Bug 3929 - tlclient.exe no longer runs correctly on Wine
Summary: tlclient.exe no longer runs correctly on Wine
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: 3.1.2
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.1.1
Assignee: Pierre Ossman
URL:
Keywords: astrand_tester, prosaic
Depends on:
Blocks: 4861
  Show dependency treegraph
 
Reported: 2011-08-04 10:07 CEST by Peter Åstrand
Modified: 2013-10-24 10:49 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2011-08-04 10:07:59 CEST
tlclient no longer runs on Wine: The login is started, but when WinPopenProcess tries to TerminateProcess() Putty, you get the error message:

TerminateProcess failed with error 6

I've investigated this somewhat, and it is really strange. TerminateProcess() works OK before  SSHTunnel::ReadAndHandleOutput, but not after. And the only thing that function does is to read from the process.
Comment 1 Peter Åstrand cendio 2011-08-04 10:09:00 CEST
With this patch, the client can connect:

--- tlclient_winprocess.cc	(revision 22736)
+++ tlclient_winprocess.cc	(arbetskopia)
@@ -127,8 +127,10 @@
             // Note: We cannot use the hProc handle, because this
             // object does not have sufficient rights.
             if (! TerminateProcess(process_handle, 0)) {
+#if 0
                 throw TLException(ERR_PROCESS_ERROR, _("TerminateProcess failed with error ") +
                                   TLUtils::LongToString(GetLastError()));
+#endif
             }
             break;
Comment 2 Peter Åstrand cendio 2011-12-22 11:07:04 CET
Hate this bug, nominating for 3.4, even if it will be just a upstream bug report. 
Comment 3 Peter Åstrand cendio 2013-06-25 14:50:37 CEST
Since we are not using Putty any longer, the original problem should be gone. However, we have a new one instead. ssh.exe does not run in Wine. This is because it closes all fds above 2, and this does not work with Wine. We should report this to the Wine project and/or provide a workaround.
Comment 4 Pierre Ossman cendio 2013-07-02 10:28:41 CEST
Do a simple workaround in the form of patching OpenSSH to not try to close file descriptors on Windows.
Comment 5 Pierre Ossman cendio 2013-07-17 15:24:27 CEST
Fixed in r27691.
Comment 6 Peter Åstrand cendio 2013-10-21 12:41:24 CEST
This particular problem seems to be fixed since stderr logging works, but we have a new bug instead. Moved to bug 4861.

Note You need to log in before you can comment on or make changes to this bug.