Comment 27 for bug 1864901

Revision history for this message
Nick Grimshaw (nickgrim) wrote :

> The sleep process will outlive the launcher process at most 60 seconds, after which it will exit.

A problem I'm seeing is that the sleep process is sometimes *blocking* progression of other scripts e.g. if you pipe the output of a chromium process to something else:

```
$ snap refresh
All snaps up to date.

$ snap list | grep chromium
chromium 81.0.4044.138 1143 latest/stable canonical* -

$ time chromium --product-version
81.0.4044.138

real 0m0.206s
user 0m0.107s
sys 0m0.110s

$ time chromium --product-version | tee /dev/null
81.0.4044.138

real 1m0.161s # <--- !!!
user 0m0.122s
sys 0m0.078s
```

I came here from https://github.com/titusfortner/webdrivers/issues/168 as mentioned in #5, and the situation there is slightly worse, for reasons that aren't clear to me. That Ruby code is attempting to read the Chromium version through a pipe, very much like the following code, and this blocks *indefinitely*, not just for 60 seconds:
```
$ irb
irb(main):001:0> pipe = IO.popen(['chromium','--product-version'])
=> #<IO:fd 7>
irb(main):002:0> pipe.read
 … hangs indefinitely …
```