From dae0fd31fab4bb3a32ffecf7b56c101e98d4d343 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 May 2017 11:57:45 +0200 Subject: Instrument MSYS2 workaround code for further analysis --- libbutl/process.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libbutl/process.cxx') 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 msys; // Absent if we don't know. + optional& 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 -- cgit v1.1