On Die, 2016-03-22 at 01:26 -0400, Valdis.Kletnieks@xxxxxx wrote: > On Mon, 21 Mar 2016 16:01:41 +0530, Nitin Varyani said: > > > I am running a master user-level process at Computer 1 which sends a > > process context like code, data, registers, PC, etc as well as *"pid"* to > > slave processes running at other computers. The responsibility of the slave > > process is to fork a new process on order of master process and attach *"pid" > > *given by the master to the new process it has forked. Any system call on > > slave nodes will have an initial check of " Whether the process belongs to > > local node or to the master node?". That is, if kernel at Computer 2 pid of > > the process is 1500 > > None of that requires actually controlling the PID of the child. Well, I think that the OP wants to map the PIDs with a fixed offset per host. So e.g. the local PID == 14 becomes 20014 on all other nodes. At least for debugging it's easier than some random mappings;-) As for top post: TTBOMK there is no SysCall for doing that. * Perhaps one can achieve something similar with containers - one container per remote host or so (but I never used containers actively myself) or (ab)use KVM (does vServer still live?) for local "pseudo-VMs" (and use there the original PIDs - or so). * The manual page of clone(2) doesn't reveal to me if it's possible to wish for a PID. * You could clone (pun not intended;-) the fork() syscall and add an parameter - the PID - to it (and e.g. return -1 if it's already used). BTW I don't know how the rest of the kernel reacts to such artifical PIDs (but you will see;-) outside the "official range". MfG, Bernd -- "What happens when you read some doc and either it doesn't answer your question or is demonstrably wrong? In Linux, you say "Linux sucks" and go read the code. In Windows/Oracle/etc you say "Windows sucks" and start banging your head against the wall." - Denis Vlasenko on lkml _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies