<div dir="ltr">I am reframing my question:<br>Sub-task 1: Until now, parent process cannot control the pid of the forked child. A pid gets assigned as a sequential number by the kernel at the time the process is forked . I want to modify kernel in such a way that parent process can control the pid of the forked child.<br><br>Sub-task 2: On Linux, you can find the maximum PID value for your system with the following command:<br><br>$ cat /proc/sys/kernel/pid_max<br><br>Suppose pid_max=2000 for a system. I want that the parent process should be able to assign a pid which is greater that 2000 to the forked child.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 12:03 AM, <span dir="ltr"><<a href="mailto:Valdis.Kletnieks@vt.edu" target="_blank">Valdis.Kletnieks@vt.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, 20 Mar 2016 02:07:29 -0700, Nitin Varyani said:<br>
<br>
> The linux kernel attaches a pid to newly forked process. I want to<br>
> create a facility by which a process has the option of attaching a new pid<br>
> to its child which is not in the pid space.<br>
<br>
</span>Not at all sure what you mean by "not in the pid space", or what you're<br>
trying to achieve by doing it.<br>
<br>
But "pid namespaces" may be what you're looking for.<br>
</blockquote></div><br></div>