lkml.org 
[lkml]   [1999]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: SIGIO on socket disconnect
Date
 Hi, 

Try this, state_change() doesnt do kill_fasync(). Actually I noticed a
significant delay before SIGIO gets detected. Maybe there is more broken here..

Rene.

--- af_unix.orig.c Fri May 7 21:00:33 1999
+++ af_unix.c Fri May 7 21:15:53 1999
@@ -322,7 +322,7 @@
{
if (sk->type==SOCK_STREAM && unix_our_peer(sk, skpair))
{
- skpair->state_change(skpair);
+ skpair->error_report(skpair);
skpair->shutdown=SHUTDOWN_MASK; /* No more writes*/
}
unix_unlock(skpair); /* It may now die */
@@ -1403,13 +1403,17 @@
if (other && sk->type == SOCK_STREAM &&
unix_our_peer(sk, other)) {
int peer_mode = 0;
-
- if (mode&RCV_SHUTDOWN)
+
+ if (mode&RCV_SHUTDOWN) {
peer_mode |= SEND_SHUTDOWN;
- if (mode&SEND_SHUTDOWN)
+ other->shutdown |= peer_mode;
+ other->error_report(other);
+ }
+ if (mode&SEND_SHUTDOWN) {
peer_mode |= RCV_SHUTDOWN;
- other->shutdown |= peer_mode;
- other->state_change(other);
+ other->shutdown |= peer_mode;
+ other->state_change(other);
+ }
}
}
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.048 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site