From: Erik Faye-Lund Date: Sat, 16 Jan 2010 21:57:19 GMT Subject: Re: [PATCH v2 05/14] mingw: support waitpid with pid > 0 and WNOHANG Message-ID: <40aa078e1001161357m1799478bk35c35077f8836e9e@mail.gmail.com> In-Reply-To: <201001152328.28260.j6t@kdbg.org> On Fri, Jan 15, 2010 at 11:28 PM, Johannes Sixt wrote: > 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 > Fixed locally. -- Erik "kusma" Faye-Lund