commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 25/30: Fix detection of terminated dgram pflocal server


From: Samuel Thibault
Subject: [hurd] 25/30: Fix detection of terminated dgram pflocal server
Date: Tue, 22 Sep 2015 21:52:00 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit 25ddda6354c4b70bcd8abb79770764d8ee3d6fc3
Author: Samuel Thibault <address@hidden>
Date:   Fri Sep 11 02:08:51 2015 +0200

    Fix detection of terminated dgram pflocal server
    
    * libpipe/pipe.c (_pipe_no_readers): Break pipe for connection-less pipes
    too.
---
 libpipe/pipe.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/libpipe/pipe.c b/libpipe/pipe.c
index 9580eb7..c3d2a28 100644
--- a/libpipe/pipe.c
+++ b/libpipe/pipe.c
@@ -164,16 +164,15 @@ void _pipe_no_readers (struct pipe *pipe)
     pipe_free (pipe);
   else
     {
-      if (! pipe_is_connless (pipe))
+      /* When there is no reader, we have to break pipe even for
+         connection-less pipes.  */
+      pipe->flags |= PIPE_BROKEN;
+      if (pipe->writers)
+       /* Wake up writers for the bad news... */
        {
-         pipe->flags |= PIPE_BROKEN;
-         if (pipe->writers)
-           /* Wake up writers for the bad news... */
-           {
-             pthread_cond_broadcast (&pipe->pending_writes);
-             pthread_cond_broadcast (&pipe->pending_write_selects);
-             pipe_select_cond_broadcast (pipe);
-           }
+         pthread_cond_broadcast (&pipe->pending_writes);
+         pthread_cond_broadcast (&pipe->pending_write_selects);
+         pipe_select_cond_broadcast (pipe);
        }
       pthread_mutex_unlock (&pipe->lock);
     }

-- 
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]