

#include <sys/pidfd.h>

#include "private/bionic_fdtrack.h"

extern "C" int __pidfd_open(pid_t pid, unsigned int flags);
extern "C" int __pidfd_getfd(int pidfd, int targetfd, unsigned int flags);

int pidfd_open(pid_t pid, unsigned int flags) {
  return FDTRACK_CREATE(__pidfd_open(pid, flags));
}

int pidfd_getfd(int pidfd, int targetfd, unsigned int flags) {
  return FDTRACK_CREATE(__pidfd_getfd(pidfd, targetfd, flags));
}
