Re: [PATCH v2 05/14] mingw: support waitpid with pid > 0 and WNOHANG
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jan 15, 2010, 22:28 UTC
- Message-ID
- <201001152328.28260.j6t@kdbg.org>
- In-Reply-To
- <1263591033-4992-6-git-send-email-kusmabite@gmail.com>
On Freitag, 15. Januar 2010, Erik Faye-Lund wrote:
Show 11 quoted lines
> static inline int waitpid(pid_t pid, int *status, unsigned options)
> {
> + if (pid > 0 && options & WNOHANG) {
> + if (WAIT_OBJECT_0 != WaitForSingleObject((HANDLE)pid, 0))
> + return 0;
> + options &= ~WNOHANG;
> + }
> +
> if (options == 0)
> return _cwait(status, pid, 0);
> errno = EINVAL;With this change, and in particular the one in the next patch, this function grows too large to be 'static inline'.
-- Hannes