| 319 | } |
| 320 | |
| 321 | bool SubProcess::Kill(int signal) { |
| 322 | proc_mu_.lock(); |
| 323 | bool running = running_; |
| 324 | pid_t pid = pid_; |
| 325 | proc_mu_.unlock(); |
| 326 | |
| 327 | bool ret = false; |
| 328 | if (running && (pid > 1)) { |
| 329 | ret = (kill(pid, signal) == 0); |
| 330 | } |
| 331 | return ret; |
| 332 | } |
| 333 | |
| 334 | int SubProcess::Communicate(const string* stdin_input, string* stdout_output, |
| 335 | string* stderr_output) { |