commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 15/53: libports: work around bugs in server termination


From: Samuel Thibault
Subject: [hurd] 15/53: libports: work around bugs in server termination
Date: Thu, 20 Mar 2014 02:23:50 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit 235491231bdd1fd93507c835767503f047e10b91
Author: Richard Braun <address@hidden>
Date:   Sat Feb 22 17:16:17 2014 +0100

    libports: work around bugs in server termination
    
    Most servers use ports_manage_port_operations_multithread to process
    requests and terminate when it returns. Since many of them don't detach
    before shutting down, a client may receive an error if its request
    arrived while the server is shutting down. Prevent those spurious errors
    by forcing ports_manage_port_operations_multithread not to return.
    
    * libports/manage-multithread.c
    (ports_manage_port_operations_multithread): Force global_timeout to 0.
---
 libports/manage-multithread.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index 64e442f..2067cba 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -236,5 +236,11 @@ ports_manage_port_operations_multithread (struct 
port_bucket *bucket,
       return NULL;
     }
 
+  /* XXX It is currently unsafe for most servers to terminate based on
+     inactivity because a request may arrive after a server has started
+     shutting down, causing the client to receive an error.  Prevent the
+     master thread from going away.  */
+  global_timeout = 0;
+
   thread_function ((void *) 1);
 }

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]