Inline get_used_fd_lsof() and don't call os:find_executable/1 any more, it's quite expensive. And maybe the command could fail for other reasons?
Merge bug25792