https://bugs.kde.org/show_bug.cgi?id=417906

--- Comment #6 from Thiago Macieira <thi...@kde.org> ---
Want me to open a separate report for P_PIDFD? Crude adapting your testcase:

#define _GNU_SOURCE

#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>

int main(int argc, char **argv)
{
  int pid;
  int fd;

  if ((pid = syscall(SYS_clone, CLONE_VFORK | CLONE_PIDFD, NULL, &fd, NULL, 0))
< 0)
    {
      perror("clone");
    }
  else if (pid > 0)
    {
      struct siginfo si;
      struct rusage usage;

      printf("pidfd = %d\n", fd);
      syscall(SYS_waitid, fd, P_PIDFD, &si, WEXITED | __WALL, &usage);
    }

  exit(0);
}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to