From: Ian Jackson Subject: [PATCH] libxc: restore: reset I/O fd to flags to back to state caller passed us Date: Tue, 7 Sep 2010 19:07:27 +0100 Message-ID: <19590.32607.697639.1704@mariner.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Brendan Cully , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("[Xen-devel] [PATCH] libxc: restore: reset I/O fd to flags to back to state caller passed us"): > libxc: restore: reset I/O fd to flags to back to state caller passed us > > In particular this causes us to turn O_NONBLOCK back off if we set it. This one doesn't apply any more. This hunk: > - { > - if ( (flags = fcntl(io_fd, F_GETFL,0)) < 0 ) > - flags = 0; > - fcntl(io_fd, F_SETFL, flags | O_NONBLOCK); > - } > + fcntl(io_fd, F_SETFL, orig_io_fd_flags | O_NONBLOCK); seems to have become stale. Have I applied these in the wrong order or something ? Ian.