Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fork
//gcc 7.4.0 #include <stdio.h> {#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<sys/types.h> int main() { int pid=getpid(); int y,z; printf("the process id before fork is %d\n,pid"); pid=fork(); if(pid<0) { printf("error in creation of parent process "); } if(pid==0) { printf("grandparent is-->pid %d and ppid=%d\n"); getpid(); } y=fork(); if (pid==0) { int pid=y,x; printf("my parent is -->pid %d and the process id is %d\n",y,x); } printf("my process id is %d x,my parent id is y my grandparent id is z"); } return 0; }
run
|
edit
|
history
|
help
0
faster posting list using skip pointers
session1
14th Dec Project1 v0.2
Newtons method
1.3 Max threads
get_bit
prueba 3
main.c
test
Nitheesh