From: Stephen Hemminger <stephen@networkplumber.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andrey Vagin <avagin@openvz.org>, netdev@vger.kernel.org
Subject: Re: [PATCH] ip: set the close-on-exec flag for descriptors
Date: Mon, 8 Jul 2013 12:57:48 -0700 [thread overview]
Message-ID: <20130708125748.2425c44d@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1373293036.4979.105.camel@edumazet-glaptop>
On Mon, 08 Jul 2013 07:17:16 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Tue, 2013-06-04 at 09:11 -0700, Stephen Hemminger wrote:
> > On Tue, 4 Jun 2013 12:01:14 +0400
> > Andrey Vagin <avagin@openvz.org> wrote:
> >
> > > Otherwise a program executed by "ip netns exec" has two extra
> > > descriptors.
> > >
> > > $ ip netns exec test /bin/bash
> > > $ lsof -p $$
> > > ...
> > > bash 817 root 0u CHR 136,0 0t0 3 /dev/pts/0
> > > bash 817 root 1u CHR 136,0 0t0 3 /dev/pts/0
> > > bash 817 root 2u CHR 136,0 0t0 3 /dev/pts/0
> > > bash 817 root 3u sock 0,6 0t0 13386 protocol: NETLINK
> > > bash 817 root 4r REG 0,3 0 4026532155 net
> > > bash 817 root 255u CHR 136,0 0t0 3 /dev/pts/0
> >
> > Applied
>
> It seems it could break ip command for old kernels, as SOCK_CLOEXEC is
> supported from 2.6.27
>
> Not sure if its worth a patch, to do the normal socket() call followed
> by legacy fcntl() one.
Nevermind, original patch is fine since the set namespace (NR_setns) system
call used did not show up into 3.0!
next prev parent reply other threads:[~2013-07-08 19:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 8:01 [PATCH] ip: set the close-on-exec flag for descriptors Andrey Vagin
2013-06-04 16:11 ` Stephen Hemminger
2013-07-08 14:17 ` Eric Dumazet
2013-07-08 15:51 ` Andrey Wagin
2013-07-08 16:05 ` Eric Dumazet
2013-07-08 19:23 ` Andrey Wagin
2013-07-08 19:50 ` Stephen Hemminger
2013-07-08 19:57 ` Stephen Hemminger [this message]
2013-07-08 20:00 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130708125748.2425c44d@nehalam.linuxnetplumber.net \
--to=stephen@networkplumber.org \
--cc=avagin@openvz.org \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).