summaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
commit4318fbda2a7ee51caafdc4eb1f8028a3f0605142 (patch)
treecddb50a81d7d1a628cc400519162080c6d87868e /net/core/sock.c
parent36ea5120664550fae6d31f1c6f695e4f8975cb06 (diff)
o Merge with Linux 2.1.91.
o First round of bugfixes for the SC/MC CPUs. o FPU context switch fixes. o Lazy context switches. o Faster syscalls. o Removed dead code. o Shitloads of other things I forgot ...
Diffstat (limited to 'net/core/sock.c')
-rw-r--r--net/core/sock.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index f940e5a80..7707c70d0 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -663,31 +663,13 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, unsigne
goto failure;
/*
- * FIXME: Check 1003.1g should we deliver
- * a signal here ???
+ * We should send SIGPIPE in these cases according to
+ * 1003.1g draft 6.4. If we (the user) did a shutdown()
+ * call however we should not.
*
- * Alan, could we solve this question once and forever?
- *
- * I believe, datagram sockets should never
- * generate SIGPIPE. Moreover, I DO think that
- * TCP is allowed to generate it only on write()
- * call, but never on send/sendto/sendmsg.
- * (btw, Solaris generates it even on read() :-))
- *
- * The reason is that SIGPIPE is global flag,
- * so that library function using sockets (f.e. syslog()),
- * must save/disable it on entry and restore on exit.
- * As result, signal arriving for another thread will
- * be lost. Generation it on write() is still necessary
- * because a lot of stupid programs never check write()
- * return value.
- *
- * Seems, SIGPIPE is very bad idea, sort of gets().
- * At least, we could have an option disabling
- * this behaviour on per-socket and/or per-message base.
- * BTW it is very easy - MSG_SIGPIPE flag, which
- * always set by read/write and checked here.
- * --ANK
+ * Note: This routine isnt just used for datagrams and
+ * anyway some datagram protocols have a notion of
+ * close down.
*/
err = -EPIPE;
@@ -699,7 +681,7 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, unsigne
else {
/* The buffer get won't block, or use the atomic queue. It does
produce annoying no free page messages still.... */
- skb = sock_wmalloc(sk, size, 0 , GFP_BUFFER);
+ skb = sock_wmalloc(sk, size, 0, GFP_BUFFER);
if (!skb)
skb=sock_wmalloc(sk, fallback, 0, sk->allocation);
}