MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / close_fds

Method close_fds

lib/tiny-process/process_win.cpp:323–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void Process::close_fds() noexcept {
324 if(stdout_thread.joinable())
325 stdout_thread.join();
326 if(stderr_thread.joinable())
327 stderr_thread.join();
328
329 if(stdin_fd)
330 close_stdin();
331 if(stdout_fd) {
332 if(*stdout_fd != nullptr)
333 CloseHandle(*stdout_fd);
334 stdout_fd.reset();
335 }
336 if(stderr_fd) {
337 if(*stderr_fd != nullptr)
338 CloseHandle(*stderr_fd);
339 stderr_fd.reset();
340 }
341}
342
343bool Process::write(const char *bytes, size_t n) {
344 if(!open_stdin)

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected