SORRY for bugging you guys so much...
Regarding fork() implementation in UML
I was going through the below code=20
current->thread.forking =3D 1;
ret =3D do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs),
¤t->thread.regs, 0, NULL, NULL);
current->thread.forking =3D 0;
Can pls let me know why current->thread.forking =3D 1 was done before
calling do_fork() and then reset after that ?
From: Jeff Dike <jdike@ad...> - 2007-03-16 02:30:38
On Thu, Mar 15, 2007 at 10:29:28PM +0800, Krishnappa Abhijith-A21204 wrote:
> Can pls let me know why current->thread.forking = 1 was done before
> calling do_fork() and then reset after that ?
If you look at copy_thread, you will see that there is different
treatment for kernel threads and processes, and thread.forking is used
to distinguish between them.
Work email - jdike at linux dot intel dot com