Skip to content

Commit

Permalink
* spawn.cc (find_exec): Use the first detected errno when lookup fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Faylor committed Apr 27, 2010
1 parent 0f6697b commit 9b53b52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions winsup/cygwin/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2010-04-27 Christopher Faylor <me+cygwin@cgf.cx>

* spawn.cc (find_exec): Use the first detected errno when lookup fails.

2010-04-27 Corinna Vinschen <corinna@vinschen.de>

* include/regex.h: Include _ansi.h to avoid missing out on preprocessor
Expand Down
4 changes: 3 additions & 1 deletion winsup/cygwin/spawn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9b53b52

Please sign in to comment.