Note that in some IDEs, e.g. RStudio or R.app on macOS, the IDE itself opens files from other threads, in addition to the files opened from the main R thread.
For a zombie process it throws a
Other process handle functions:
p <- ps_handle() ps_num_fds(p) f <- file(tmp <- tempfile(), "w") ps_num_fds(p) close(f) unlink(tmp) ps_num_fds(p)