MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / exec

Function exec

Plugins/lua_wrapper/Source/lua_wrapper/Private/lua_wrapper.cpp:100–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99#ifndef _MSC_VER
100std::string exec(const char* cmd) {
101 char buffer[128];
102 std::string result = "";
103 FILE* f = popen(cmd, "r");
104 if (!f) {
105 return "popen() failed...";
106 }
107 try {
108 while (!feof(f)) {
109 if (fgets(buffer, 128, f) != NULL) {
110 result += buffer;
111 }
112 }
113 } catch (...) {
114 pclose(f);
115 return "run cmd failed...";
116 }
117 pclose(f);
118 return result;
119}
120#endif
121
122void Flua_wrapperModule::PluginButtonClicked()

Callers 1

PluginButtonClickedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected