]> Pileus Git - ~andy/linux/commitdiff
um: Run UML in it's own session.
authorRichard Weinberger <richard@nod.at>
Sun, 18 Aug 2013 11:30:09 +0000 (13:30 +0200)
committerRichard Weinberger <richard@nod.at>
Sat, 7 Sep 2013 08:57:07 +0000 (10:57 +0200)
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().

Reported-and-tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/main.c

index 749c96da7b99492a4656faf29be190fa9908b330..e1704ff600ff9e677a98a4711d5c8b7b2ff8cf6a 100644 (file)
@@ -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");