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)
Tue, Nov 18, 1:51 AM
Unknown Object (File)
Fri, Nov 14, 6:44 AM
Unknown Object (File)
Sun, Nov 9, 1:24 AM
Unknown Object (File)
Mon, Nov 3, 11:50 AM
Unknown Object (File)
Mon, Nov 3, 11:50 AM
Unknown Object (File)
Mon, Nov 3, 11:49 AM
Unknown Object (File)
Mon, Nov 3, 11:49 AM
Unknown Object (File)
Mon, Nov 3, 11:49 AM

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