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)
Jan 29 2024, 8:59 PM
Unknown Object (File)
Dec 20 2023, 3:58 AM
Unknown Object (File)
Dec 12 2023, 4:47 AM
Unknown Object (File)
Aug 27 2023, 11:17 PM
Unknown Object (File)
Aug 27 2023, 11:16 PM
Unknown Object (File)
Aug 27 2023, 11:14 PM
Unknown Object (File)
Aug 27 2023, 2:38 PM
Unknown Object (File)
Aug 26 2023, 5:16 AM
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