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

Method close_fds

lib/tiny-process/process_unix.cpp:436–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436void Process::close_fds() noexcept {
437 if(stdout_stderr_thread.joinable())
438 stdout_stderr_thread.join();
439
440 if(stdin_fd)
441 close_stdin();
442 if(stdout_fd) {
443 if(data.id > 0)
444 close(*stdout_fd);
445 stdout_fd.reset();
446 }
447 if(stderr_fd) {
448 if(data.id > 0)
449 close(*stderr_fd);
450 stderr_fd.reset();
451 }
452}
453
454bool Process::write(const char *bytes, size_t n) {
455 if(!open_stdin)

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected