ebiederm at 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