diff options
author | Ira Cooper <ira@samba.org> | 2013-03-13 13:36:11 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-03-13 23:50:04 +0100 |
commit | ccb39a3fd2144417aea0190ecc7fe3ed165c7cc8 (patch) | |
tree | e9dc623cf184c9944f2a5ccc491421af8a2a4b8c /lib | |
parent | 156fa6cd0add0c040288b5c9dc4390ad1abf656a (diff) | |
download | samba-ccb39a3fd2144417aea0190ecc7fe3ed165c7cc8.tar.gz samba-ccb39a3fd2144417aea0190ecc7fe3ed165c7cc8.tar.bz2 samba-ccb39a3fd2144417aea0190ecc7fe3ed165c7cc8.zip |
tsocket: ENOMEM can be retried on illumos/Solaris.
The writev system call can return -1 and errno ENOMEM, as a
retriable condition.
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 13 23:50:05 CET 2013 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tsocket/tsocket_bsd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index 4b54d319a0..89e5f4cee8 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -60,6 +60,12 @@ static int tsocket_bsd_error_from_errno(int ret, return sys_errno; } + /* ENOMEM is retryable on Solaris/illumos, and possibly other systems. */ + if (sys_errno == ENOMEM) { + *retry = true; + return sys_errno; + } + #ifdef EWOULDBLOCK if (sys_errno == EWOULDBLOCK) { *retry = true; |