Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: "Tomcsányi, Domonkos" <domi@tomcsanyi.net>,
	"Garrit Franke" <garritfranke@gmail.com>,
	"WireGuard mailing list" <wireguard@lists.zx2c4.com>
Subject: Re: [PATCH] Adding support for reloading configuration via systemd
Date: Fri, 24 Jul 2020 16:49:31 +0200	[thread overview]
Message-ID: <CAHmME9oQ3UyweSVepF3bfsuTYo7EiGXkdFwqJ=bKcDOHwLbZyQ@mail.gmail.com> (raw)
In-Reply-To: <20200724144605.GA1897@nautica>

On Fri, Jul 24, 2020 at 4:46 PM Dominique Martinet
<asmadeus@codewreck.org> wrote:
> FWIW, bash (and zsh, ksh etc) will optimise the last command call of a
> script to not fork, `bash -c 'exec foo'`  is the same as `bash -c 'foo'`
>
> (for some reason it doesn't in the subshell though so that one makes a
> difference; you can check with e.g. `strace -f -e clone bash -c ...`)
>
>
> Simpler shells e.g. dash or busybox ash don't, but they don't support
> the pipe substitution syntax either so I guess it doesn't matter here.

Right, I observed the same thing when I was testing this, but figured
it was better to be explicit in both cases.

thinkpad ~ # strace -f -e clone /bin/bash -c '/usr/bin/wg syncconf
wgnet0 <(/usr/bin/wg-quick strip wgnet0)' 2>&1 | grep clone | wc -l
3
thinkpad ~ # strace -f -e clone /bin/bash -c 'exec /usr/bin/wg
syncconf wgnet0 <(/usr/bin/wg-quick strip wgnet0)' 2>&1 | grep clone |
wc -l
3
thinkpad ~ # strace -f -e clone /bin/bash -c 'exec /usr/bin/wg
syncconf wgnet0 <(exec /usr/bin/wg-quick strip wgnet0)' 2>&1 | grep
clone | wc -l
2

  reply	other threads:[~2020-07-24 14:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <VI1PR02MB52169D6F055314DCD03746EDE6760@VI1PR02MB5216.eurprd02.prod.outlook.com>
2020-07-23 14:10 ` Tomcsanyi, Domonkos
2020-07-24  9:14   ` Jason A. Donenfeld
2020-07-24  9:25     ` Garrit Franke
2020-07-24  9:27       ` Garrit Franke
2020-07-24  9:29       ` Jason A. Donenfeld
2020-07-24 13:09         ` Tomcsányi, Domonkos
2020-07-24 14:26           ` Jason A. Donenfeld
2020-07-24 14:46             ` Dominique Martinet
2020-07-24 14:49               ` Jason A. Donenfeld [this message]
2020-07-24  9:54       ` Matthias Urlichs
2020-07-24 10:52         ` Stefan Tatschner
2020-07-24 11:00           ` Matthias Urlichs
2020-07-25 12:16     ` Tore Anderson
2020-07-27 15:51       ` Jason A. Donenfeld
2020-07-27 20:04         ` Tore Anderson
2020-07-28  9:03           ` Jason A. Donenfeld
2020-07-28  9:54             ` Tore Anderson
2020-07-28 11:55               ` Jason A. Donenfeld
2020-07-28 12:17                 ` Tore Anderson
2020-07-28 12:17                   ` Jason A. Donenfeld

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='CAHmME9oQ3UyweSVepF3bfsuTYo7EiGXkdFwqJ=bKcDOHwLbZyQ@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=asmadeus@codewreck.org \
    --cc=domi@tomcsanyi.net \
    --cc=garritfranke@gmail.com \
    --cc=wireguard@lists.zx2c4.com \
    /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).