After closing a file descriptor honor the "closed" flag to avoid
re-closing it in post-fork processing.
File descriptors must be closed during an orphan operation, because
the closing of the file-descriptor is necessary for the correct function
of code that is polling on the descriptor. Thus even if there are active
references, the close() call is necessary. But this means that post-fork
code may close the file-descriptor, since it is only unregistered from
post-fork after the ref-count reaches 0. All of this can be handled by
ensuring that the post-fork code honors the "close" flag.
* Remove the toolchains //third_party/toolchains:local and //third_party/toolchains:local_large.
* Remove the platforms :rbe_ubuntu1604, :rbe_ubuntu1604_large, :local and :local_large.
* No longer inherit from @rbe_default//config:platform but instead use it directly. It is now the only non-windows platform.
* When creating @rbe_default//config:platform directly with rbe_autoconfig, set dockerAddCapabilities and dockerPrivileged directly in the exec_properties field. No need to set dockerNetwork to "off" and dockerSiblingContainers to false since these are the defaults.
* Also set gceMachineType = "n1-highmem-2" on the default platform. This value can be overridden by specific targets that want to use LARGE_MACHINE.
* Use create_exec_properties_dict where appropriate.
* Use custom_exec_properties to define LARGE_MACHINE.
I wasn't able to test thoroughly that this PR does not break any existing targets. I was not able to run anything on windows/mac and I also don't have access to gRPC's RBE setup.