MCPcopy Create free account
hub / github.com/Singular/Singular / WriteProcess

Function WriteProcess

ppcc/adlib/os.cc:132–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132int WriteProcess(Str *prog, StrArr *args, Str *data) {
133 Str *command = BuildCommand(prog, args);
134 FILE *pipe = popen(command->c_str(), "w");
135 if (!pipe)
136 return 0;
137 int success = WriteFile(pipe, data);
138 if (pclose(pipe))
139 return 0;
140 return success;
141}
142
143int System(Str *prog, StrArr *args) {
144 Str *command = BuildCommand(prog, args);

Callers 1

ExecCompilerFunction · 0.85

Calls 3

BuildCommandFunction · 0.85
WriteFileFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected