mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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: Richard W.M. Jones <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
This commit is contained in:
parent
91d44ff860
commit
250127216d
1 changed files with 2 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue