[Wine-patches] [eterhack] Check for WINEHOLDSERVER in wineserver (eterbug #4360).

Alexander Morozov amorozov на etersoft.ru
Чт Окт 15 21:19:00 MSD 2009


----------- следующая часть -----------
From 7427a8e4f151ecd125c109c40f81b35fc05c1c53 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Thu, 15 Oct 2009 20:54:51 +0400
Subject: [eterhack] Check for WINEHOLDSERVER in wineserver (eterbug #4360).

---
 etersoft/scripts/wine.in |    3 ---
 server/main.c            |    8 ++++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/etersoft/scripts/wine.in b/etersoft/scripts/wine.in
index ee876ee..73d9736 100644
--- a/etersoft/scripts/wine.in
+++ b/etersoft/scripts/wine.in
@@ -440,9 +440,6 @@ if [ -n "$WINEWORKDIRPATH" ] ; then
 	cd "$WINEWORKDIRPATH"
 fi
 
-# do not exit from Wine after close application
-[ -z "$WINEHOLDSERVER" ] || wineserver --persistent=$WINEHOLDSERVER
-
 # if file is exist in Unix or Wine notation
 WINEPROGRAMUNIXPATH=$($WINELOADER winepath "$1")
 if [ -n "$1" ] && [ -f "$WINEPROGRAMUNIXPATH" ] ; then
diff --git a/server/main.c b/server/main.c
index 938bacb..ef69211 100644
--- a/server/main.c
+++ b/server/main.c
@@ -64,6 +64,13 @@ static void usage(void)
     fprintf(stderr, "\n");
 }
 
+static void check_persist_env(void)
+{
+    char *persist = getenv( "WINEHOLDSERVER" );
+    if (!persist) return;
+    master_socket_timeout = (timeout_t)atoi( persist ) * -TICKS_PER_SEC;
+}
+
 static void parse_args( int argc, char *argv[] )
 {
     int ret, optc;
@@ -132,6 +139,7 @@ static void sigterm_handler( int signum )
 int main( int argc, char *argv[] )
 {
     setvbuf( stderr, NULL, _IOLBF, 0 );
+    check_persist_env();
     parse_args( argc, argv );
 
     /* setup temporary handlers before the real signal initialization is done */
-- 
1.6.4.4



Подробная информация о списке рассылки Wine-patches