ash.c lazy loading of APIs unavailable on nanoserver
Created by: jhowardmsft
Signed-off-by: John Howard firstname.lastname@example.org
Part of the changes required for busybox 64-bit to run on nanoserver in a container on Windows.
Nanoserver does not support the full API surface of the windowsservercore images. This change updates shell/ash.c so that the functions are lazily loaded from kernel32 and do not cause busybox to quit when calling an unsupported API.
The reason for this change (there are others in the pipeline) is to support running docker CI on Windows using nanoserver as the base image. Currently the CI servers at https://github.com/docker/docker use windowsservercore. Docker makes extensive use of busybox for its integration test suite. To move to nanoserver (which dramatically improves) performance and allows the use of Hyper-V containers as well, we need a 64-bit version of busybox which doesn't fail calling Win32 APIs which aren't available in nanoserver.