Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15

Re: [PATCH] remove unnecessary loop

From: Alex Riesen <hidden>
Date: 2016-06-15 22:43:08

On 5/8/07, Liu Yubao [off-list ref] wrote:
+#ifdef __CYGWIN__
+               /*
+                * On cygwin, lstat("hello", &st) returns 0 when
+                * "hello.exe" exists, so test with open() again.
+                */
+               if (lstat(match, &st) && -1 != (fd = open(match, O_RDONLY))) {
This does not "test again" if lstat returns 0. If lstat returns 0
(file stat info
obtained) the open is not even called. Besides, cygwin lies not only about
.exe but also about .lnk files.

P.S. Somehow I have the feeling that even if it is a stupidity in cygwin
they will not fix it (nor will they admit it is a bug).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help