Source-Changes-HG archive

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

[src/trunk]: src/lib/librumpuser Don't puff sigpipe if the connection has bee...



details:   https://anonhg.NetBSD.org/src/rev/39dbbc81b3f3
branches:  trunk
changeset: 758600:39dbbc81b3f3
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Nov 10 16:12:15 2010 +0000

description:
Don't puff sigpipe if the connection has been severed.  May happen
e.g. when a client executes a blocking call such a poll() and
decides to exit before the result is ready.

diffstat:

 lib/librumpuser/sp_common.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r db6ade1d08fc -r 39dbbc81b3f3 lib/librumpuser/sp_common.c
--- a/lib/librumpuser/sp_common.c       Wed Nov 10 14:12:28 2010 +0000
+++ b/lib/librumpuser/sp_common.c       Wed Nov 10 16:12:15 2010 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sp_common.c,v 1.2 2010/11/05 14:23:45 pooka Exp $     */
+/*      $NetBSD: sp_common.c,v 1.3 2010/11/10 16:12:15 pooka Exp $     */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -150,7 +150,7 @@
                        }
                }
 
-               n = write(fd, sdata + sent, dlen - sent);
+               n = send(fd, sdata + sent, dlen - sent, MSG_NOSIGNAL);
                if (n == 0) {
                        return EFAULT;
                }



Home | Main Index | Thread Index | Old Index