> I've found the problem. This type of loop does not work: > > do { > alarm(t); > read(fd); > if (EINT) > exception(); > else > alarm(0); > } while (data); > > There are some semantics here that differ from other *nix where this > works. The read() won't come out when the alarm comes, and the socket > will effectively become broken. The restart or continue behaviour is undefined unless you use sigaction() to control your signal behaviour (see POSIX.1 or SuS). Even then your code is buggy on every OS I know Suppose this happens.. alarm(1) [sudden swap frenzy] alarm is delivered.. do nothing read blocks forever. You need to make clever use of siglongjmp to avoid that one occurring or use select/poll. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
- Re:2.4.0-test9-pre8, usb, unresolved symbols f5ibh
- RE: 2.4.0-test9-pre8, usb, unresolved symbols Dunlap, Randy
- Re:2.4.0-test9-pre8, usb, unresolved symbols f5ibh
- Re: 2.4.0-test9-pre8, usb, unresolved symbols Claude LeFrancois (LMC)
- 2.4.0-test6 network socket problems J. Scott Kasten
- Re: 2.4.0-test6 network socket problems J. Scott Kasten
- Re: 2.4.0-test6 network socket proble... Richard B. Johnson
- Re: 2.4.0-test6 network socket proble... Alan Cox
- Re: 2.4.0-test6 network socket pr... J. Scott Kasten
- Re: 2.4.0-test9-pre8, usb, unresolved symbols Greg KH
- Re: 2.4.0-test9-pre8, usb, unresolved sym... Claude LeFrancois (LMC)
- Re: 2.4.0-test9-pre8, usb, unresolved... Keith Owens
- Re: 2.4.0-test9-pre8, usb, unreso... Randy Dunlap
- Re: 2.4.0-test9-pre8, usb, u... Greg KH
- Re: 2.4.0-test9-pre8, usb, u... Keith Owens
- Re: 2.4.0-test9-pre8, us... Greg KH
- Re: 2.4.0-test9-pre8, us... Keith Owens
- Re: 2.4.0-test9-pre8, us... Greg KH