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.

ps_num_fds(p)

Arguments

p

Process handle.

Value

Integer scalar.

Details

For a zombie process it throws a zombie_process error.

See also

Examples

p <- ps_handle() ps_num_fds(p)
#> [1] 12
f <- file(tmp <- tempfile(), "w") ps_num_fds(p)
#> [1] 13
close(f) unlink(tmp) ps_num_fds(p)
#> [1] 12