Комментарии:
i am very grateful to you,,...this is the first time i am posting any comment ...i love you sir ....its really helpful ..i appreciate your service ..god bless you .
ОтветитьSir in my output in parent block parent id is always printing 1. why is that ? and my outputs are also fixed like first child block is printing and then parent block they are not getting mixed like in yours. Does it have to do something with fact that i am working in zsh bash?
Ответитьsir i have implemented the same code but its showing error near else
Ответить👍👍👍
Ответитьplz use English throughout the video.I don't understand hindi
ОтветитьYou said q is the pid of the child and fork() returns the value of pid of child. However you said if q==0 is true then it is the child process. Then how is q printed to be 93? Shouldnt it be printing 0?
Ответитьthe code for the exercise:
if(q==0)
fork();
only this part should be added,is this correct sir??
Does execution always prefer parent process first?
ОтветитьYou're a lifesaver sir ! Great explanation
ОтветитьThanks a lot Sir
Ответитьi am getting different id at some time and same id at some time. for same program like
before fork
PARENT My child's id is 3025
PARENT I am parent having id 3024
Common
CHILD I am child having id 3025
CHILD My parent's id is 1461
Common
PLEASE EXPLAIN
int main()
{
pid_t p1,p2;
printf("Before Creating Child \n");
p1=fork();
if (p1==0)
{ printf("this is child process p1 having pid %d \n",getpid());
printf("parent id of child process p1 is p=%d \n",getppid());
p2=fork();
if (p2==0)
{ printf("this is child process p2 having pid %d \n",getpid());
printf("parent id pp1 of child process p2 is p=%d \n",getppid());
}
else {
printf("this is parent process pp1 having pid %d \n",getpid());
printf("pid of child process p2 is %d \n",p2);
}
}
else {
printf("this is parent process p having pid %d \n",getpid());
printf("pid of child process p1 is %d \n",p1);
}
}
This is code to create child process inside child process
Ответитьsir can u please share the last que's solution its bit confusing and can u please explain with 2 3 examples .....that will be very helpful
Ответитьsuch a great tutor , love you sir
Ответитьplease explain ls and ps command using c in system calls
Ответитьgreat explanation
Ответитьkumar
Ответитьgood explanation sir
loved it.
Super!
ОтветитьWhere are more videos???? Only 11 videos i could find....plz upload more!
Ответитьbahut wadia explain kita..simple te practical approach
Ответить