MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / ExitSummary

Function ExitSummary

tests/gtest/gtest-all.cc:7802–7824  ·  view source on GitHub ↗

Generates a textual description of a given exit code, in the format specified by wait(2).

Source from the content-addressed store, hash-verified

7800// Generates a textual description of a given exit code, in the format
7801// specified by wait(2).
7802static std::string ExitSummary(int exit_code) {
7803 Message m;
7804
7805# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
7806
7807 m << "Exited with exit status " << exit_code;
7808
7809# else
7810
7811 if (WIFEXITED(exit_code)) {
7812 m << "Exited with exit status " << WEXITSTATUS(exit_code);
7813 } else if (WIFSIGNALED(exit_code)) {
7814 m << "Terminated by signal " << WTERMSIG(exit_code);
7815 }
7816# ifdef WCOREDUMP
7817 if (WCOREDUMP(exit_code)) {
7818 m << " (core dumped)";
7819 }
7820# endif
7821# endif // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
7822
7823 return m.GetString();
7824}
7825
7826// Returns true if exit_status describes a process that was terminated
7827// by a signal, or exited normally with a nonzero exit code.

Callers 1

PassedMethod · 0.85

Calls 1

GetStringMethod · 0.80

Tested by

no test coverage detected