Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
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.
B_141128_MatricesSuma
Bitwise Operations
binary to txt
PRIMER PROGRAMA CON MALLOC()
hello
tickeParsing.c
Lab 5 HW Spring 2017 v1.1
AC_setting_example
Pozdravljeni v mali soli C.
Atoi without minus
Please log in to post a comment.