Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
child process
#include<stdio.h> #include<stdlib.h> #include<unistd.h> int main() { int n; scanf("enter n times %d,n); while(n!=0) { for(int i=0;i<n;i++) { if(fork() == 0) { printf("[son] pid %d from [parent] pid %d\n",getpid(),getppid()); exit(0); } n--; } } for(int i=0;i<n;i++) wait(NULL); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Star 1,3
TAREA M4- PERLAS TERMINADA
Done I think
string_ptr_to_fct_param_v2
Memory leak
lab pro v.05
assignment5
Project 3 part 2 Book v0.7
tom grey wolf
Spring 2017 Project 2 v1.1
Please log in to post a comment.