Re: Cygwin's execlp() does not work with an empty $PATH element

2022-06-27 Thread Takashi Yano
On Mon, 27 Jun 2022 20:16:36 +0900 Takashi Yano wrote: > How about the following patch? This is better a bit. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index e0f1247e1..292cd5a42 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -95,6 +95,7 @@ find_exec (const

Re: Cygwin's execlp() does not work with an empty $PATH element

2022-06-27 Thread Takashi Yano
On Sun, 26 Jun 2022 15:09:34 + "Lavrentiev, Anton \(NIH/NLM/NCBI\) \[C\] wrote: > An empty PATH element (":xxx" or "xxx::xxx" or "xxx:") is to be considered as > the current directory (from the very first days of Unix). > > However, Cygwin does not seem to obey the rule. > > Consider the fol

RE: Cygwin's execlp() does not work with an empty $PATH element

2022-06-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
t; Anton (NIH/NLM/NCBI) [C] via Cygwin > Sent: Sunday, June 26, 2022 11:10 AM > To: 'cygwin@cygwin.com' > Subject: [EXTERNAL] Cygwin's execlp() does not work with an empty $PATH > element > > Hi all, > > An empty PATH element (":xxx" or "xxx::

Cygwin's execlp() does not work with an empty $PATH element

2022-06-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
Hi all, An empty PATH element (":xxx" or "xxx::xxx" or "xxx:") is to be considered as the current directory (from the very first days of Unix). However, Cygwin does not seem to obey the rule. Consider the following simple C program: $ cat hello.c #include #include #include #include int ma