From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-releng@lists.gentoo.org
Subject: [gentoo-releng] [PATCH] catalyst-auto: run in a mount namespace
Date: Wed, 22 Jan 2014 00:59:51 -0500 [thread overview]
Message-ID: <1390370391-9799-1-git-send-email-vapier@gentoo.org> (raw)
This way if things crash, we don't leak mounts that need cleaning up.
---
tools/catalyst-auto | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/catalyst-auto b/tools/catalyst-auto
index c4c6aa6..c4796a1 100755
--- a/tools/catalyst-auto
+++ b/tools/catalyst-auto
@@ -1,5 +1,13 @@
#!/bin/bash
+# First let's get our own mount namespace to avoid leaking crap.
+if [[ -z ${UNSHARE} ]] ; then
+ if type -P unshare >&/dev/null ; then
+ UNSHARE=true exec unshare -m -- "$0" "$@"
+ fi
+fi
+unset UNSHARE
+
PID=$$
config_file=
--
1.8.4.3
reply other threads:[~2014-01-22 5:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1390370391-9799-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-releng@lists.gentoo.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