Page MenuHomeFreeBSD

snp(4): properly report detached/revoked ttys and implement detach
ClosedPublic

Authored by kib on Sep 24 2022, 8:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 6:22 AM
Unknown Object (File)
Sun, Nov 17, 11:53 AM
Unknown Object (File)
Fri, Nov 15, 7:43 AM
Unknown Object (File)
Fri, Nov 8, 1:51 AM
Unknown Object (File)
Oct 22 2024, 9:44 AM
Unknown Object (File)
Oct 22 2024, 4:09 AM
Unknown Object (File)
Oct 12 2024, 5:56 PM
Unknown Object (File)
Oct 8 2024, 5:58 PM

Diff Detail

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

Event Timeline

kib requested review of this revision.Sep 24 2022, 8:26 PM
pauamma_gundo.com added inline comments.
share/man/man4/snp.4
93

While here: is "using" missing here? ie, "does not allow using SNPSTTY..."?

I think this is good, but it is a behavior change.
The tty_gone stuff is definitely good, though

sys/dev/snp/snp.c
298

This changes the return value from 0 to -2. That seems correct to me, but I wanted to confirm that's intended.

kib marked 2 inline comments as done.Sep 25 2022, 11:37 AM
kib added inline comments.
share/man/man4/snp.4
93

I implemented the detach and removed BUGS section.

sys/dev/snp/snp.c
298

Yes, it is intended.

kib marked 2 inline comments as done.
kib retitled this revision from snp(4): properly report detached/revoked ttys to snp(4): properly report detached/revoked ttys and implement detach.

Implement detach.
I changed my mind and swapped SNP_DETACH/SNP_TTYCLOSE cases.

sys/dev/snp/snp.c
262

ttyhook_unregister() unlocks the tty.

Modulo the unlock mark found, I think this is good now.

sys/dev/snp/snp.c
262

indeed, it's hiding in tty_rel_free()... nice catch.

This revision is now accepted and ready to land.Sep 25 2022, 6:22 PM