Not from outside of process B.
From inside process B, you can call fork which makes a copy of your process, then let the original exit. When that happens the new copy B2 will not be a child of A, its parent will be set to 1 (the init process).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…