[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1373293036.4979.105.camel@edumazet-glaptop>
Date: Mon, 08 Jul 2013 07:17:16 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Andrey Vagin <avagin@...nvz.org>, netdev@...r.kernel.org
Subject: Re: [PATCH] ip: set the close-on-exec flag for descriptors
On Tue, 2013-06-04 at 09:11 -0700, Stephen Hemminger wrote:
> On Tue, 4 Jun 2013 12:01:14 +0400
> Andrey Vagin <avagin@...nvz.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists