As Chris pointed out in comment #31, upstart's use of setsid() means
that, by default, all processes of a launched application are in the
same session and process group. This process group is orphaned from the
start so the kernel does not send SIGHUP/SIGCONT signals when, for
example, webbrowser-app dies.

If we wanted applications to manage this themselves (I don't think we
do, but...), the main process of an application could leave itself in
the process group created by upstart. As the main application process
forks off new processes, it could place those processes in a different
process group. If/when the main process dies (such as the low memory
killer sending it a SIGKILL), then the kernel recognizes that the
process group containing the children processes will be orphaned and it
will send SIGHUP/SIGCONT to all processes in the process group.

It would make the application author's jobs quite a bit more difficult,
but I also see how they could benefit from leaving all smart/essential
processes in the main process group and placing all dumb worker
processes in the other process group.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1303676

Title:
  [webapp-container] when using multiple webapps they crash randomly, if
  there is only one app remaining, this one starts being replaced when
  new ones start

To manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1303676/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to