mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-13 04:29:09 +08:00
The commit 90ddab98780d uses myself->dwProcessId to get windows pid. However, it will be overridden in stub process if exec() is called. With this patch, GetCurrentProcessId() instead of myself->dwProcessId. Fixes: 90ddab98780d ("Cygwin: console: Re-fix open() failure on exec() by console owner") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> (cherry picked from commit 8ee8b0c974d723d618182fbbdeb1e9186b69c6f3)
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin