[PATCH 2/4] kernelbase: Duplicate input and output handles to ensure that they are inheritable.