Pages

Tuesday 5 February 2019

System call programs on different process ids- ubuntu

/* program to illustrate different Process id */
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>  // for datatypes
#include<sys/types.h> // for standard symbolic constants & types
void main()
{
    int pid;
    printf("\n process id = %d", getpid());
    printf("\n parent process =%d", getppid());
    printf("\n group id=%d", getgid());
    printf("\n user id =%d\n", getuid());
}

output


No comments:

Post a Comment