| 105 | } |
| 106 | |
| 107 | Str *BuildCommand(Str *prog, StrArr *args) { |
| 108 | Str *command = new Str(1024); |
| 109 | command->add(ShellEscape(prog)); |
| 110 | for (Int i = 0; i < args->len(); i++) { |
| 111 | command->add(' ')->add(ShellEscape(args->at(i))); |
| 112 | } |
| 113 | return command; |
| 114 | } |
| 115 | |
| 116 | Str *ReadProcess(Str *prog, StrArr *args) { |
| 117 | Str *command = BuildCommand(prog, args); |
no test coverage detected