From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH XEN v8 26/29] tools/libs/*: Use O_CLOEXEC on Linux and FreeBSD Date: Tue, 19 Jan 2016 13:24:28 +0000 Message-ID: <20160119132428.GB1691@citrix.com> References: <1452864168.32341.97.camel@citrix.com> <1452864188-2417-1-git-send-email-ian.campbell@citrix.com> <1452864188-2417-27-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1452864188-2417-27-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: wei.liu2@citrix.com, Roger.Pau@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, Jan 15, 2016 at 01:23:05PM +0000, Ian Campbell wrote: > In some cases this replaces an FD_CLOEXEC dance, in others it is new. > = > Linux has had O_CLOEXEC since 2.6.23 (October 2007), so we can rely on > it from Xen 4.7 I think. Some libc headers may still lack the > definition, so we take care of that if need be by defining to 0 (on > the premise that such an old glibc might barf on O_CLOEXEC even if the > kernel may or may not be so old). > = > All stable versions of FreeBSD support O_CLOEXEC (10.2, 9.3 and 8.4), > and we assume the libc there does too. > = > Remove various comments about having to take responsibility for this > (since really it is just hygiene, politeness, not a requirement) and > the reasons for using O_CLOEXEC seem pretty straightforward. > = > Backends for other OSes are untouched. > = > Signed-off-by: Ian Campbell > Acked-by: Roger Pau Monn=E9 Acked-by: Wei Liu