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
F147843674: D36690.id110952.diff
Sat, Mar 14, 3:07 AM
F147816838: D36690.id110952.diff
Fri, Mar 13, 9:33 PM
Unknown Object (File)
Wed, Mar 11, 3:20 PM
Unknown Object (File)
Wed, Mar 11, 1:10 PM
Unknown Object (File)
Wed, Mar 11, 6:05 AM
Unknown Object (File)
Tue, Mar 10, 9:28 PM
Unknown Object (File)
Fri, Feb 27, 4:41 AM
Unknown Object (File)
Mon, Feb 16, 10:42 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

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
89

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
309

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
89

I implemented the detach and removed BUGS section.

sys/dev/snp/snp.c
309

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
263

ttyhook_unregister() unlocks the tty.

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

sys/dev/snp/snp.c
263

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