Issue #3472 has been reported by tuxillo. ---------------------------------------- Bug #3472: syscons: VT_WAITACTIVE returns at once for a vt that was never opened http://bugs.dragonflybsd.org/issues/3472
* Author: tuxillo * Status: New * Priority: Normal * Target version: 6.6 * Start date: 2026-11-18 ---------------------------------------- As of master (3351c65f80), VT_WAITACTIVE returns 0 right away when the vt you wait for has never been opened, instead of blocking until it becomes active. With the default /etc/ttys that's vt 10 and up, and vt 9 too if X isn't running. The ioctl sleeps on the target vty's scr_stat, which only exists after the vty is first opened. Since 8aefdd25a3 (#2481) a NULL scr_stat just returns 0. ConsoleKit2 runs one VT_WAITACTIVE thread per vt and takes each return as a vt switch, so it loops. console-kit-daemon ends up using about half a CPU and close to 1 GB, and it never marks the X session on vt 9 active, so polkit allow_active rules don't apply. Test program and patch attached. The patch does what FreeBSD's syscons does and sleeps on a per-vt channel that exists whether or not the vt was opened. Run the test as root. ---Files-------------------------------- vt_waitactive.c (2.06 KB) 0001-syscons-let-VT_WAITACTIVE-wait-for-a-vty-that-was-ne.patch (3.48 KB) -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
