From: Johannes Sixt Date: Fri, 15 Jan 2010 22:28:28 GMT Subject: Re: [PATCH v2 05/14] mingw: support waitpid with pid > 0 and WNOHANG 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: > 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