aboutsummaryrefslogtreecommitdiff
path: root/libbutl/process.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-19 11:57:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-19 11:57:45 +0200
commitdae0fd31fab4bb3a32ffecf7b56c101e98d4d343 (patch)
treeb3755f1b46e1b261831c2c62e423b0dc0849f079 /libbutl/process.cxx
parent70062c72cc7f0acef94a333247cc07df74cd3626 (diff)
Instrument MSYS2 workaround code for further analysis
Diffstat (limited to 'libbutl/process.cxx')
-rw-r--r--libbutl/process.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbutl/process.cxx b/libbutl/process.cxx
index 53dd282..49e11bb 100644
--- a/libbutl/process.cxx
+++ b/libbutl/process.cxx
@@ -1170,7 +1170,8 @@ namespace butl
// process loaded the msys-2.0.dll. With this improvement we can then
// wait longer and try harder.
//
- optional<bool> msys; // Absent if we don't know.
+ optional<bool>& msys = msys_; // Absent if we don't know.
+ msys = nullopt;
for (size_t ret (0); ret != (msys ? 40 : 20); ++ret)
{
@@ -1270,6 +1271,7 @@ namespace butl
{
exit = process_exit ();
exit->status = es;
+ exit->msys_ = msys_;
}
else
{
@@ -1306,6 +1308,7 @@ namespace butl
exit = process_exit ();
exit->status = es;
+ exit->msys_ = msys_;
}
return true;
@@ -1392,7 +1395,8 @@ namespace butl
switch (status)
{
case STATUS_ACCESS_VIOLATION: return "access violation";
- case STATUS_DLL_INIT_FAILED: return "DLL initialization failed";
+ case STATUS_DLL_INIT_FAILED: return "DLL initialization failed" +
+ string (msys_ ? (*msys_ ? " (MSYS)" : " (not MSYS)") : " (unknown)");
case STATUS_INTEGER_DIVIDE_BY_ZERO: return "integer divided by zero";
// VC-compiled program that calls abort() terminates with this error code