[X2Go-Dev] [PATCH] Fix threading on OS X.

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Sat Feb 18 22:04:30 CET 2012


Comitted:
http://code.x2go.org/gitweb?p=x2goclient.git;a=commitdiff;h=523d81c193cb7b7b666f65237caa58f6260785b7

Mike

On Sa 18 Feb 2012 04:57:52 CET Mihai Moldovan wrote:

> Raise the stack space to 2MB for secondary threads. It previously used
> the 512KB system default.
>
> Signed-off-by: Mihai Moldovan <ionic at ionic.de>
> ---
>  sshmasterconnection.cpp |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp
> index c922af2..2626346 100644
> --- a/sshmasterconnection.cpp
> +++ b/sshmasterconnection.cpp
> @@ -46,6 +46,11 @@ static bool isLibSshInited=false;
>  SshMasterConnection::SshMasterConnection ( QString host, int port, bool
> acceptUnknownServers, QString user,
>          QString pass, QString key,bool autologin, bool krblogin,
> QObject* parent ) : QThread ( parent )
>  {
> +#if defined ( Q_OS_DARWIN )
> +    // Mac OS X provides only 512KB stack space for secondary threads.
> +    // As we put a 512KB buffer on the stack later on, we need a bigger
> stack space.
> +    setStackSize (sizeof (char) * 1024 * 1024 * 2);
> +#endif
>      this->host=host;
>      this->port=port;
>      this->user=user;
> @@ -62,7 +67,7 @@ SshMasterConnection::SshMasterConnection ( QString
> host, int port, bool acceptUn
>      else
>          x2goDebug<<"starting ssh connection without kerberos
> authentication"<<endl;
>  #endif
> -kerberos=false;
> +    kerberos=false;
>  }
>
>  SshMasterConnection::SshMasterConnection ( QString host, int port, bool
> acceptUnknownServers, QString user,
> @@ -70,7 +75,9 @@ SshMasterConnection::SshMasterConnection ( QString
> host, int port, bool acceptUn
>          int remotePort, QString localHost, int localPort, SshProcess*
> creator,
>          QObject* parent, ONMainWindow* mwd ) : QThread ( parent )
>  {
> -
> +#if defined ( Q_OS_DARWIN )
> +    setStackSize (sizeof (char) * 1024 * 1024 * 2);
> +#endif
>      this->host=host;
>      this->port=port;
>      this->user=user;
> --
> 1.7.9
>
>



-- 

DAS-NETZWERKTEAM
mike gabriel, dorfstr. 27, 24245 barmissen
fon: +49 (4302) 281418, fax: +49 (4302) 281419

GnuPG Key ID 0xB588399B
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20120218/2c9f4185/attachment.pgp>


More information about the x2go-dev mailing list