pidns: Consolidate initialzation of special init task state

Instead of setting child_reaper and SIGNAL_UNKILLABLE one way
for the system init process, and another way for pid namespace
init processes test pid->nr == 1 and use the same code for both.

This is a small cleanup and it paves the way for allowing unshare
of the pid namespace as that path like our global init also will

Signed-off-by: Eric W. Biederman <>
2 files changed