Considering this example :
#include <stdio.h>
#include <unistd.h>
int main()
{
int pgid;
if ((pgid = getpgid(0)) == -1)
perror("getpgid");
else
printf("pgid : %d\n", pgid);
}
When I'm running this program without valgrind, everything is going right, and the pgid is printed.
Whenever I'm using valgrind, perror will print getpgid: Function not implemented.
Is it normal that
getpgidis not available under valgrind ?Is there any alternative to get the pgid of a specific pid (excluding
getpgrp) ?
I'm using macOS Sierra 10.12.6 and valgrind-3.15.0.