Hi Amit<div><br><div class="gmail_quote">On Wed, Sep 19, 2012 at 4:49 AM, Amit Gupta <span dir="ltr"><<a href="mailto:gupta.v.amit@gmail.com" target="_blank">gupta.v.amit@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>Hi Kshemendra,<div><br></div><div>I think I couldn't get my first question across clearly. My intent isn't to change do_fork()'s implementation. That wont work for precisely the reason you mentioned.(Infact everything after the init process would end up blocked). </div>
<div><br></div><div>My question was more to explore if an existing running process can be explicitly taken off the runqueue once we have a pointer to its task_struct.</div><div><br></div></blockquote><div><br></div><div>
If you simply want to stop a running process and resume it at your will,</div><div>you don't need to write any kernel code at all. Simply use the cgroup</div><div>freezer functionality from userspace. You can find more details in</div>
<div>Documentation/cgroups/freezer-subsystem.txt in the kernel sources.</div><div><br></div><div>Regards,</div><div>Srivatsa S. Bhat</div><div><br></div></div></div>