Skip to contentSkip to conversation

+ fork-allow-init-to-become-a-session-leader.patch added to -mm tree

DISCUSSION Christoph Lameter 2 participants 2 messages Feb 8, 2006 – Feb 9, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Review

Quoted 5 lines · On Wed, 8 Feb 2006 [email protected] wrote:
(quoted diff) +5 -0
+			if (unlikely(p->pid == 1)) {
+				p->signal->tty = NULL;
+				p->signal->leader = 1;
+				p->signal->pgrp = 1;
+				p->signal->session = 1;

Would it not be better to do these special settings for init from init itself?

#2 lore raw
Quoted 10 lines · Christoph Lameter

Review

Quoted 5 lines · On Wed, 8 Feb 2006 [email protected] wrote:
(quoted diff) +5 -0
+			if (unlikely(p->pid == 1)) {
+				p->signal->tty = NULL;
+				p->signal->leader = 1;
+				p->signal->pgrp = 1;
+				p->signal->session = 1;

Would it not be better to do these special settings for init from init itself?

So if you mean from within the kernel context that is doable, so long as we only have one process with pid == 1.

Although we may be able fix the kernel limitations in setsid().

For multiple pid == 1 case I don't know of another place in the kernel I can possibly put this. I can't put it later because there is no place later, and I can't put it earlier or else my efforts would just get stomped.

So I did it this way so I don't have to come back and change it to this next week. I'd love to have a better place to put this code.

Eric