Messages in this thread | | | From | doctor@fruitbat ... | Subject | Re: recvfrom in linux not return | Date | Thu, 3 Jun 1999 16:18:14 -0700 (PDT) |
| |
Xiaodi Lu said ... > > Hi, > I have a UDP client which send packet to an echo server and receive the > same packet back. Most time it works fine. But some time the recvfrom > call is hanging without returning anything, even no error return. I set > the alarm signal try to break the recvfrom and reach to next step in > process. It doesn't work. I also tried to send a SIGPIPE signal to that
UDP, unlike TCP, is an unreliable data transport. You are not guaranteed that data sent will actually be received.
> same process, but the recvfrom is still hanging. > Please help if you know anything about this! I appreciate it.
Make sure you have a signal handler setup. recvfrom() should return EINTR when interrupted by a signal.
> Thanks! > Tracy
-- Peter A. Castro (doctor@fruitbat.org) or (pcastro@us.oracle.com)
- 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/
| |