Comment 5 for bug 1864901

Revision history for this message
Bèr Kessels (berkes) (ber) wrote :

It also occurs with a freshly installed chromium.

It can be easily reproduced:

```
$ pgrep chromium | xargs kill # kill any running chromium (beware!)
$ pgrep chromium | wc -l
0 # There are non running
$ /snap/bin/chromium --product-version # command quits immediately.
$ pgrep chromium | wc -l
1
$ /snap/bin/chromium # opens a browser.
# Quit browser manually.
$ pgrep chromium | wc -l
2
$ ps faux | grep chromium # check any processes running.
\_/bin/sh /snap/chromium/1100/bin/chromium.launcher --product-version
\_/bin/sh /snap/chromium/1100/bin/chromium.launcher
```

This shows that a process remains active after closing or running.
The `ps faux` shows the leftover running processes and clearly shows they no longer have a parent: it seems the parent process forks, then quits, but leaves its child running.

Above comment comes from a bug that this behaviour introduced in a project that uses chrome: https://github.com/titusfortner/webdrivers/issues/168

So, besides it leaving around running processes (slightly messy), it causes bugs (hanging) in scripts and tools that wait for chrome+children to exit.