MCPcopy Create free account
hub / github.com/apache/impala / RedirectStdout

Function RedirectStdout

be/src/kudu/util/pstack_watcher-test.cc:60–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static FILE* RedirectStdout(string *temp_path) {
61 string temp_dir;
62 CHECK_OK(Env::Default()->GetTestDirectory(&temp_dir));
63 *temp_path = Substitute("$0/pstack_watcher-dump.$1.txt",
64 temp_dir, getpid());
65 FILE* reopened;
66 POINTER_RETRY_ON_EINTR(reopened, freopen(temp_path->c_str(), "w", stdout));
67 return reopened;
68}
69
70TEST(TestPstackWatcher, TestPstackWatcherRunning) {
71 string stdout_file;

Callers 1

TESTFunction · 0.85

Calls 3

DefaultClass · 0.85
SubstituteFunction · 0.85
GetTestDirectoryMethod · 0.80

Tested by

no test coverage detected