Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Linux-Kernel Archive: Re: SIGIO on socket disconnect Re: SIGIO on socket disconnect kuznet@ms2.inr.ac.ru Fri, 7 May 1999 20:34:00 +0400 (MSK DST) Messages sorted by: [ date ][ thread ][ subject ][ author ] Next message: Greg Zornetzer: "Re: SIGIO on socket disconnect" Previous message: Brian Geisel: "Re: Ethernet Oops / Ethernet Freak" In reply to: Andrea Arcangeli: "Re: Overscheduling DOES happen with high web server load." Hello! > Recently I have run across a problem with Linux 2.2 kernels concerning the > generation of SIGIO signals when the far end of a socket disconnects. Yes :( It calls sk->state_change, which does not generate signal. BTW I have no idea why it could work in 2.0. It does exactly the same thing. In any case, try the patch enclosed. Alexey --- ../orig/linux/net/unix/af_unix.c Mon Mar 22 21:11:06 1999 +++ linux/net/unix/af_unix.c Fri May 7 20:32:22 1999 @@ -322,7 +322,7 @@ { if (sk->type==SOCK_STREAM && unix_our_peer(sk, skpair)) { - skpair->state_change(skpair); + skpair->data_ready(skpair,0); skpair->shutdown=SHUTDOWN_MASK; /* No more writes*/ } unix_unlock(skpair); /* It may now die */ @@ -1409,7 +1415,10 @@ if (mode&SEND_SHUTDOWN) peer_mode |= RCV_SHUTDOWN; other->shutdown |= peer_mode; - other->state_change(other); + if (peer_mode&RCV_SHUTDOWN) + other->data_ready(other,0); + else + 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/ Next message: Greg Zornetzer: "Re: SIGIO on socket disconnect" Previous message: Brian Geisel: "Re: Ethernet Oops / Ethernet Freak" In reply to: Andrea Arcangeli: "Re: Overscheduling DOES happen with high web server load."