lkml.org 
[lkml]   [2001]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: ENOMEM on socket writes
Date
Hello!

> memory". Rsync is writing on a socket which is set non-blocking and
> the write is apparently returning ENOMEM.

This must not happen with stock 2.4.0. TCP never returns ENOMEM.
Please, investigate.

But application should be ready to get this error yet.


> >From the point of view of the application, ENOMEM is a little hard to
> deal with constructively.

The only constructive way to handle this is to fail instantly
and to release all the allocated resources as soon as possible,
avoiding operations requiring allocating new resources.


> Select will say that the socket is
> writable, so there doesn't seem to be a good way of waiting until the
> write has a chance of succeeding.

It never will if you do not abort something.

It is in theory. In practice, write() on TCP returns EAGAIN on
transient errors and application will spin, which is normal.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.031 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site