This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] Propagate correct Windows error if executable can't be opened
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 17 Mar 2016 16:46:20 -0000
- Subject: [newlib-cygwin] Propagate correct Windows error if executable can't be opened
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4c9bb3e0f934babda5aea0712a70a893f93cff4b
commit 4c9bb3e0f934babda5aea0712a70a893f93cff4b
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Thu Mar 17 17:46:11 2016 +0100
Propagate correct Windows error if executable can't be opened
* spawn.cc (av::setup): Set last Win32 error if NtOpenFile fails.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/spawn.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 1cc5cf3..a2111c2 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -1085,6 +1085,7 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
real_path.set_cygexec (true);
break;
}
+ SetLastError (RtlNtStatusToDosError (status));
goto err;
}
if (!GetFileSizeEx (h, &size))