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)
Sun, May 31, 1:22 PM
Unknown Object (File)
Sun, May 31, 1:19 PM
Unknown Object (File)
Sat, May 30, 5:17 PM
Unknown Object (File)
Sat, May 30, 5:13 PM
Unknown Object (File)
Wed, May 27, 5:23 PM
Unknown Object (File)
Wed, May 27, 3:33 AM
Unknown Object (File)
Wed, May 27, 3:25 AM
Unknown Object (File)
Tue, May 26, 10:10 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