From: Richard Weinberger <richard@nod.at>
To: richard@nod.at
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH 4/4] um: Run UML in it's own session.
Date: Sun, 18 Aug 2013 13:30:09 +0200 [thread overview]
Message-ID: <1376825409-18570-4-git-send-email-richard@nod.at> (raw)
In-Reply-To: <1376825409-18570-1-git-send-email-richard@nod.at>
If UML is not run by a shell it can happen that UML
will kill unrelated proceses upon a fatal exit because
it issues a kill(0, ...).
To prevent such oddities we create a new session in main().
Cc: rjones@redhat.com
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/um/os-Linux/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 749c96d..e1704ff 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -123,6 +123,8 @@ int __init main(int argc, char **argv, char **envp)
setup_env_path();
+ setsid();
+
new_argv = malloc((argc + 1) * sizeof(char *));
if (new_argv == NULL) {
perror("Mallocing argv");
--
1.8.3.1
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2013-08-18 11:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 11:30 [uml-devel] [PATCH 1/4] um: ubd: Add REQ_FLUSH suppport Richard Weinberger
2013-08-18 11:30 ` [uml-devel] [PATCH 2/4] um: ubd: Introduce submit_request() Richard Weinberger
2013-08-18 11:30 ` [uml-devel] [PATCH 3/4] um: Cleanup SIGTERM handling Richard Weinberger
2013-08-19 9:28 ` Richard W.M. Jones
2013-08-18 11:30 ` Richard Weinberger [this message]
2013-08-19 9:30 ` [uml-devel] [PATCH 4/4] um: Run UML in it's own session Richard W.M. Jones
2013-08-19 20:23 ` Richard Weinberger
2013-09-07 12:14 ` Richard W.M. Jones
2013-09-07 12:16 ` Richard Weinberger
2013-08-19 9:21 ` [uml-devel] [PATCH 1/4] um: ubd: Add REQ_FLUSH suppport Richard W.M. Jones
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=1376825409-18570-4-git-send-email-richard@nod.at \
--to=richard@nod.at \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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