| 130 | } |
| 131 | |
| 132 | int 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 | |
| 143 | int System(Str *prog, StrArr *args) { |
| 144 | Str *command = BuildCommand(prog, args); |
no test coverage detected