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;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s