Messages in this thread Patch in this message | | | From | Rene Janssen <> | Subject | Re: SIGIO on socket disconnect | Date | Sat, 8 May 1999 21:25:44 +0200 |
| |
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/
| |