Question
modify this program so that it used clone instead of fork. the output should be This is process(thread) 11501. x+y=1 > This is process(thread) 11502.
modify this program so that it used clone instead of fork.
the output should be
This is process(thread) 11501. x+y=1 > This is process(thread) 11502. x+y=7
//fork makes a second process, running the same executable
//pid_t used to be long, but now just int #include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started