OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] Use task_pgrp()/task_session() in copy_process
Re: [RFC][PATCH] Use task_pgrp()/task_session() in copy_process [message #17137 is a reply to message #17136] Thu, 11 January 2007 21:19 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
ebiederm@xmission.com (Eric W. Biederman) writes:
>
> So it probably makes sense for pidmap_init to initialize the
> pid for the session and group of the idle task.  And then there
> are no special cases left.

Well that almost works except if we did that alloc_pid could not
successfully allocate pid 1.  Grumble getting those special cases
out of the boot path is a pain.  

If we had a non-hashed struct pid (init_pid?) that we filled in
early (statically?), that would keep copy_process happy.

Then we would need to call setsid() in the kernel right after
the fork to assign a legitimate session and process group
to pid == 1.

Since the idle thread is not doing anything it shouldn't matter,
although we can attach the idle thread after the fork to session
and process group == 1 or set them to NULL if there is a corner case
is anything that cares.  

Eric
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: + rename-attach_pid-to-find_attach_pid.patch added to -mm tree
Next Topic: + attach_pid-with-struct-pid-parameter.patch added to -mm tree
Goto Forum:
  


Current Time: Sun Jul 27 15:37:25 GMT 2025

Total time taken to generate the page: 0.47611 seconds