8177522: -XX:OnOutOfMemoryError does not work if supplied twice on windows

Use cmd /c on windows to execute onError commands

Reviewed-by: dholmes, hseigel
This commit is contained in:
Vladimir Kempik 2017-05-18 08:14:33 -04:00
parent 553d1e815b
commit 84fde21dc7
3 changed files with 49 additions and 15 deletions

View file

@ -1396,6 +1396,8 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
out.print_raw ("/bin/sh -c ");
#elif defined(SOLARIS)
out.print_raw ("/usr/bin/sh -c ");
#elif defined(WINDOWS)
out.print_raw ("cmd /C ");
#endif
out.print_raw ("\"");
out.print_raw (cmd);