This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: What causes interrupted network system calls?
- From: "Carruth, Rusty" <Rusty dot Carruth at smartm dot com>
- To: "Grant Edwards" <grant dot b dot edwards at gmail dot com>, <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 28 Oct 2009 10:02:20 -0700
- Subject: RE: [ECOS] What causes interrupted network system calls?
- References: <hc9q4t$26t$1@ger.gmane.org>
In my experience with Solaris and Linux, you should ALWAYS check for
EINTR and retry the operation. As I remember, you wouldn't get them
often, but you could (and of course, it was always at the worst possible
moment!).
If I remember right (which may not be the case!).
I don't suppose you have the Stevens book? What does it say about this?
Rusty
Rusty Carruth | CSE
SSD Storage Products Division | SMART Modular Technologies
Adtron Corporation | 4415 E. Cotton Center Blvd | Phoenix, AZ 85040
Office: 602-735-0300 | Fax: 602-735-0349 | Email:
Rusty.Carruth@smartm.com | www.smartm.com
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-
> owner@ecos.sourceware.org] On Behalf Of Grant Edwards
> Sent: Wednesday, October 28, 2009 9:06 AM
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] What causes interrupted network system calls?
>
> Somebody working on a network-intensive eCos application
> reported to me that in situations where there are frequent
> connection open/close operations, the various socket-related
> system calls (send, connect, etc.) are frequently returning
> -EINTR.
>
> This application was recently ported from the old NetBSD
> network stack to the FreeBSD stack, and the -EINTR return
> values were never seen with the old stack.
>
> Is the frequent -EINTR return expected behavior for the new
> stack?
>
> Is there a way to get the stack to restart system calls, or is
> application code required to check for -EINTR and retry system
> calls?
>
> --
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss