Add functions to open pidfds, i.e. file descriptors representing processes, for process ids and vice versa. Both functions work an array of fds/pids, stop on error and return the number of successfully handled items.