User Id and Process Id

#include<stdio.h>
#include<stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
printf(“Proces Id=%d\n”,getpid());
printf(“Parent Process Id=%d\n”,getppid());
printf(“User Id=%d\n”,getuid());
printf(“User Id effettivo=%d\n”,geteuid());
printf(“User Group Id =%d\n”,getgid());
return 0;
}

Advertisements