Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-04-28 03:06:48 +0400
committerChristopher Faylor <me@cgf.cx>2010-04-28 03:06:48 +0400
commit9b53b52a80f79a7746f51e2092b23dfab3d50c6f (patch)
tree5e3f13e4b02c53c7de32eb81b640b31135af509d /winsup/cygwin/spawn.cc
parent0f6697b373128d8a7c179d3246a0fc5dbd8fa35d (diff)
* spawn.cc (find_exec): Use the first detected errno when lookup fails.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index c8b2fcf5a..e583f8fea 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -173,7 +173,9 @@ find_exec (const char *name, path_conv& buf, const char *mywinenv,
debug_printf ("trying %s", tmp);
- if ((suffix = perhaps_suffix (tmp, buf, err, opt)) != NULL)
+ int err1;
+
+ if ((suffix = perhaps_suffix (tmp, buf, err1, opt)) != NULL)
{
if (buf.has_acls () && check_file_access (buf, X_OK, true))
continue;