Treat unexpected errors as "don't know". Invert Pidcheck return value, so nonzero including error codes = "the process may exist". On Windows: Catch exited but still existing processes. Handle undefined PROCESS_QUERY_LIMITED_INFORMATION. On Unix: don't trust F_GETLK error to leave the input alone, the fcntl() doc seems unclear.