MCPcopy Create free account
hub / github.com/baidu/tera / DumpStringToFile

Function DumpStringToFile

src/tera_main.cc:35–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33volatile sig_atomic_t g_quit = 0;
34
35static void DumpStringToFile(const std::string& s, const std::string& filename) {
36 std::fstream file;
37 file.open(filename, std::ios::out);
38 if (!file.is_open()) {
39 LOG(ERROR) << "Open file " << filename << " failed";
40 return;
41 }
42 file << s;
43 file.close();
44}
45
46static void SignalIntHandler(int sig) { g_quit = 1; }
47

Callers 2

SignalUsr1HandlerFunction · 0.85
SignalUsr2HandlerFunction · 0.85

Calls 2

openMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected