[wt4hq] Broken Pipe
Mario Lorenz
ml at vdazone.org
Tue Jun 19 21:51:48 CEST 2007
Am 19. Jun 2007, um 07:55:12 schrieb Olivier F5MZN:
> Actually, I still have some gaps regarding signal handling on socket
> programming so any recommandations are welcome, Mario!
>
> Can you send me a suggested modification? I should rather create a CVS
> or SVN access to let you modify by yourself but I'm always too busy to
> find a couple a minutes for that!
along the lines of:
_send(...)
...
case EAGAIN:
case EINTR:
case EWOULDBLOCK:
case ENOBUFS:
/* Socket buffer is full:
* will try to send the datas later
*/
break;
...
(just send the data next time).
and in case of receive: Just receive again:
...
if (err == EAGAIN)
continue;
if (err == EINTR)
continue;
sprintf(szError, "error %d on recv",
err);
tun = closeconn(sock, szError);
continue;
...
But this is only a correctness thing.
Closing the connections is a valid error handling strategy,
especially since you dont expect signals to occur.
I just stumbled on this when I saw the SIGPIPE strace posted here.
> > On a related note, Olivier, will you be in Friedrichshafen at Ham Radio
> > next weekend?
>
> Yes, the WT team will be at FHN this year. We will be hosted at the
> Apello booth, feel free to visit us! We will also take part to the great
> BCC diner on Saturday.
Excellent. Hopefully I will be there, too. (90% chance).
Mario
--
Mario Lorenz Internet: <ml at vdazone.org>
Ham Radio: DL5MLO at DB0ERF.#THR.DEU.EU
"Your mouse has moved. Windows NT must be restarted
for the change to take effect. Reboot now ? [ OK ]"
More information about the Wt4hq
mailing list