Sweets / hummingbird

Hummingbird init system for Linux based operating systems.
MIT License
247 stars 7 forks source link

Can not chroot into hummingbird based envoirment #20

Closed Ocean-Moist closed 3 years ago

Ocean-Moist commented 3 years ago

I try to chroot, and it gives me:

Hummingbird must be ran as PID 1

It probably is an issue on my side, But this my be some weird thing with how hummingbird checks PID?

Ocean-Moist commented 3 years ago

I am going to say this is on me.

Sweets commented 3 years ago

Hummingbird checks pid with getpid(). Anything that isn’t 1 errors out (any non-1 PID means an init has already ran an presumably already done a boot up sequence).

https://github.com/Sweets/hummingbird/blob/master/src/hummingbird.c#L26