mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
These consts were defined locally, but are now defined in golang.org/x/sys, so we can use those. Also added some documentation about how this function works, taking the description from the GetExitCodeProcess function (processthreadsapi.h) API reference: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess > The GetExitCodeProcess function returns a valid error code defined by the > application only after the thread terminates. Therefore, an application should > not use `STILL_ACTIVE` (259) as an error code (`STILL_ACTIVE` is a macro for > `STATUS_PENDING` (minwinbase.h)). If a thread returns `STILL_ACTIVE` (259) as > an error code, then applications that test for that value could interpret it > to mean that the thread is still running, and continue to test for the > completion of the thread after the thread has terminated, which could put > the application into an infinite loop. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>