[Bug 285394] sysutils/consolekit2 seems to use wrong tty

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 18 Mar 2025 17:48:38 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285394

--- Comment #11 from Gleb Popov <arrowd@FreeBSD.org> ---
(In reply to Andriy Gapon from comment #10)

Running

lsof -p $(pgrep console) | grep /dev

on two different laptops and FreeBSD versions gives me

console-k 36175 root  12r     VCHR                   0,8      0t0      8
/dev/console (devfs)
console-k 11619 root  12r     VCHR                   0,8      0t0      8
/dev/console (devfs)

So in my case it actually opens /dev/console
For reference, fstat -p:

root     console-kit-daemon 11619   12 /dev          8 crw-------  console  r

This is indeed strange, because the code that tries /dev/tty gets executed
before. It seems that ck_fd_is_a_console() returns -1 for /dev/tty in my case
for some reason.

What happen if you patch out the /dev/tty block forcing consolekit to use
/dev/console?

-- 
You are receiving this mail because:
You are the assignee for the bug.