Can we edit the proc structure?

I need to set a field called "container id" for every process which a child process can inherit from its parent. Do I need to edit the proc structure to add a field in it in the sub-section "copied upon fork"?
 
I don't think adding such field in that section will give you the copy and set for free, but I could be wrong. Have a look at kern_proc.c to see how the fork is handled.
 
Back
Top