[Bug 253278] x11-servers/xorg-server: Lock file: Various fixes

[email protected]
Newsgroups gmane.os.freebsd.devel.x11
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253278

Olivier Certner <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|Affects Only Me             |Affects Some People

--- Comment #2 from Olivier Certner <[email protected]> ---
Hi, sorry for not having stated the high-level use case here:
- Launch X with "startx", specifying '/usr/local/bin/Xorg' as the server.
E.g.: "startx -- /usr/local/bin/Xorg :1"
You'll get an immediate crash saying "Can't read lock file /tmp/.X1-lock".
Although no lock file exists at all under '/tmp'.

The error comes from the fact that some lock file is prepared under another
name (e.g., for display :1, under name '/tmp/.tX1-lock'), and this file is then
hardlink to the final lock name using link(2), which improperly fails. 


The point of fixes 2 and 3 is to respectively better report on this problem and
solve it. 3 is a simplification of the existing code (no functional change
intended), which has the effect of working around a FreeBSD bug in link(2) that
I'm going to submit as a separate bug with patch. Fix 1 is unrelated, done
while I was looking at this code, and its usefulness is debatable, especially
once bug #253277 is fixed.

Even with this patch, pursuing with:
"startx -- /usr/local/bin/Xorg :1"
still doesn't work, because Xorg must be run as root. Substitution with:
"startx -- /usr/local/bin/X :1"
or
"startx -- /usr/local/bin/Xorg.wrap :1"
makes it work, but then the fixes are not needed, since link(2) works.

Given all that, here is a path I find reasonable:
1. Focus should be #253277, this one is secondary.
2. I'll submit these fixes upstream.

Maybe should we keep this PR open and I'll link the upstream bug here. Or I/you
can close it. Don't know what's the policy in such cases.

Thanks.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.