Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25012721 authored by Richard Weinberger's avatar Richard Weinberger
Browse files

um: Run UML in it's own session.



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: default avatarRichard W.M. Jones <rjones@redhat.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 91d44ff8
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -123,6 +123,8 @@ int __init main(int argc, char **argv, char **envp)


	setup_env_path();
	setup_env_path();


	setsid();

	new_argv = malloc((argc + 1) * sizeof(char *));
	new_argv = malloc((argc + 1) * sizeof(char *));
	if (new_argv == NULL) {
	if (new_argv == NULL) {
		perror("Mallocing argv");
		perror("Mallocing argv");