Single-file: Avoid exception-throw in startup path (dotnet/core-setup#6598)
authorSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>
Fri, 31 May 2019 00:10:23 +0000 (17:10 -0700)
committerGitHub <noreply@github.com>
Fri, 31 May 2019 00:10:23 +0000 (17:10 -0700)
commit4e6f24913d393dc948ad343d44d45a5eded5a620
tree69d6bf7cee7b40ee1fb6db95b5b86df26e8312cf
parentb693bc136055cb846c54e275a009c034adee315d
Single-file: Avoid exception-throw in startup path (dotnet/core-setup#6598)

This commit implements two changes:

1) If the current AppHost is not a bundle, process_manifest_footer() returns a bool value
   to indicate the same, rather than throwing StatusCode::AppHostExeNotBundle.
   This ensures that we do not throw every time a non-bundled app-host runs, which
   is undesirable (especially while debugging).

2) If a single-file app is simultaneously started multiple times, the apphost begins
   extracting files for each instantiation. However, once one of the runs complete the
   extraction process, other runs will use the files extracted to the committed-directory.
   The AppHost tries to clean up the redundantly extracted files and directories.
   However, if there is an I/O error while doing so, the process is now allowed
   to continue execution, instead of failing.

Commit migrated from https://github.com/dotnet/core-setup/commit/bd497d99a0f029ebed76e5398b1db769c4cc0d3c
src/installer/corehost/cli/apphost/bundle/bundle_runner.cpp
src/installer/corehost/cli/apphost/bundle/bundle_runner.h
src/installer/corehost/cli/apphost/bundle/manifest.cpp