From 566f75455b2425c11b5ef57c231c80a666ee0a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Fri, 6 Feb 2009 19:53:43 +0100 Subject: [PATCH] POSIX says that recv(3N) should fail with EINVAL if there's no OOB data available. Rev: src/modules/files/file.c:1.399 --- src/modules/files/file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 8bbcf586ef..29cb904881 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: file.c,v 1.398 2008/12/14 15:11:23 marcus Exp $ +|| $Id: file.c,v 1.399 2009/02/06 18:53:43 grubba Exp $ */ #define NO_PIKE_SHORTHAND @@ -632,8 +632,9 @@ static struct pike_string *do_read_oob(int fd, bytes_read+=i; if(!all) break; } - else if(i==0) + else if ((i==0) || (e == EINVAL)) { + /* No out of band data available. */ break; } else if(e != EINTR) -- GitLab