Page MenuHomeFreeBSD

Emit uprintf() output for initproc if there is no controlling terminal
ClosedPublic

Authored by arichardson on Jan 12 2021, 8:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 1:56 AM
Unknown Object (File)
Mon, Oct 28, 3:24 AM
Unknown Object (File)
Oct 22 2024, 3:05 AM
Unknown Object (File)
Oct 19 2024, 4:29 PM
Unknown Object (File)
Oct 19 2024, 4:29 PM
Unknown Object (File)
Oct 19 2024, 4:29 PM
Unknown Object (File)
Oct 19 2024, 4:29 PM
Unknown Object (File)
Oct 19 2024, 4:09 PM
Subscribers
None

Details

Summary

This patch helped me debug why /sbin/init was not being recognized by the
image activator in CheriBSD.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

arichardson created this revision.
jhb added a reviewer: kib.

Adding @kib in case he has any thoughts, but this looks ok to me. A larger change would perhaps be to set a tty for initproc earlier, but I'm not sure what that would break.

This revision is now accepted and ready to land.Jan 19 2021, 4:52 PM

I do not think that real init ever opens ctty (but something like /bin/sh specified as init can). You can move the check and printf() block before proctree lock, and return right after printf is done.

BTW why don't you return vprintf() value?

This revision now requires review to proceed.Jan 19 2021, 10:50 PM
This revision is now accepted and ready to land.Jan 20 2021, 9:27 AM