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)
Mon, Jul 8, 3:29 PM
Unknown Object (File)
Jun 26 2024, 10:33 PM
Unknown Object (File)
Jun 22 2024, 3:53 PM
Unknown Object (File)
Jun 22 2024, 8:36 AM
Unknown Object (File)
Jun 21 2024, 5:57 AM
Unknown Object (File)
Jun 20 2024, 10:31 PM
Unknown Object (File)
Jun 20 2024, 8:10 PM
Unknown Object (File)
Jun 20 2024, 10:48 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