MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / ExitSummary

Function ExitSummary

rtpose_wrapper/src/gtest/gtest-all.cpp:6340–6362  ·  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

6338// Generates a textual description of a given exit code, in the format
6339// specified by wait(2).
6340static String ExitSummary(int exit_code) {
6341 Message m;
6342
6343# if GTEST_OS_WINDOWS
6344
6345 m << "Exited with exit status " << exit_code;
6346
6347# else
6348
6349 if (WIFEXITED(exit_code)) {
6350 m << "Exited with exit status " << WEXITSTATUS(exit_code);
6351 } else if (WIFSIGNALED(exit_code)) {
6352 m << "Terminated by signal " << WTERMSIG(exit_code);
6353 }
6354# ifdef WCOREDUMP
6355 if (WCOREDUMP(exit_code)) {
6356 m << " (core dumped)";
6357 }
6358# endif
6359# endif // GTEST_OS_WINDOWS
6360
6361 return m.GetString();
6362}
6363
6364// Returns true if exit_status describes a process that was terminated
6365// by a signal, or exited normally with a nonzero exit code.

Callers 1

PassedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected