DescriptionMake the shell work in multiprocess mode some apps.
$ out/Debug/mojo_shell mojo:wget --enable-multiprocess \
--args-for="mojo:wget http://www.google.com/"
works.
Modifying wget to not quit, I can do:
$ ps -ef | grep mojo_shell
vtl 12159 9625 0 13:40 pts/13 00:00:00 out/Debug/mojo_shell mojo:wget --enable-multiprocess --args-for=mojo:wget http://www.google.com/
vtl 12163 12159 0 13:40 pts/13 00:00:00 out/Debug/mojo_shell --child-process-type=1 --mojo-platform-channel-handle=3
vtl 12164 12159 0 13:40 pts/13 00:00:00 out/Debug/mojo_shell --child-process-type=1 --mojo-platform-channel-handle=3
vtl 12169 12159 0 13:40 pts/13 00:00:00 out/Debug/mojo_shell --child-process-type=1 --mojo-platform-channel-handle=3
Notes:
* It doesn't work without the "--args-for", since then wget would try to
read the URL from stdin (and fail) and pass on an empty URL.
* wget and its process actually shut down cleanly.
* However, the end of the last "interactive" app leads the shell to
terminate with extreme prejudice, just cutting off the feet of the
other processes. This is why we get messages like:
[WARNING:child_process_host.cc(35)] Destroying ChildProcessHost with unjoined child
[ERROR:app_child_process.cc(208)] Connection error to the shell.
* spinning_cube doesn't work yet, since we'll need to specially load
some apps in-process.
* I made the command-line argument checking only apply to the main
process (i.e., when --child-process-type is NOT present). Otherwise,
I'd have to plumb through another flag (from platform_channel_pair.*)
and not choke when there are no positional command-line arguments.
R=jamesr@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/f3e4e33c1983dc8cf74375285b0608eb5d931b71
Patch Set 1 #
Total comments: 1
Patch Set 2 : better (?) comment #
Messages
Total messages: 4 (0 generated)
|