From: Eric Dumazet <eric.dumazet@gmail.com>
To: Andrey Wagin <avagin@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: [PATCH] ip: set the close-on-exec flag for descriptors
Date: Mon, 08 Jul 2013 09:05:06 -0700 [thread overview]
Message-ID: <1373299506.4979.112.camel@edumazet-glaptop> (raw)
In-Reply-To: <CANaxB-wjwobCnYBsL2mpR9V=WR5w7_cCgR6Pp9OA72rtVsD27A@mail.gmail.com>
On Mon, 2013-07-08 at 19:51 +0400, Andrey Wagin wrote:
> Hi Eric,
>
> 2013/7/8 Eric Dumazet <eric.dumazet@gmail.com>:
> >> 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.
>
> fcntl is not safe for multithread applications. If libnetlink isn't
> going to be used for them, I don't have objection. The patch is
> attached.
>
If you want multithread safety, you could attempt the SOCK_CLOEXEC, and
fall back in case of error to legacy socket()/fcntl()
next prev parent reply other threads:[~2013-07-08 16:05 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 [this message]
2013-07-08 19:23 ` Andrey Wagin
2013-07-08 19:50 ` Stephen Hemminger
2013-07-08 19:57 ` Stephen Hemminger
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=1373299506.4979.112.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=avagin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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