b9d07ef3e07ef6f00a2f1cc730a481e5e1291f5b added the following line to the startx script: trap "rm -f $xserverauthfile" ERR HUP INT QUIT ILL TRAP KILL BUS TERM ^^^ startx is advertised as being a POSIX shell script, but POSIX compatible shells don't need to handle ERR in trap (there's no SIGERR). This change causes startx to fail if dash is used for /bin/sh.
Created attachment 11593 [details] [review] Don't try to trap 'ERR' Matthieu, is this patch okay with you?
(In reply to comment #1) > Created an attachment (id=11593) [details] > Don't try to trap 'ERR' > > Matthieu, is this patch okay with you? > Sure, at least as a temporarly way to fix the issue. When I'll have some time to revisit the issue, I'll add some autoconf magic to detect if a bourne-like shell with ERR support is available and use it in that case. At least for my case, ERR was one of the main reason that causes startx to leave .serverauth files around.
We had several people request an automatic way to remove serverauth files in Debian too. But the most annoying problem was actually in case of hard reboot. And you have no way to trap this. So we just moved serverauth files to a temporary file in /tmp so that they are automatically cleaned on reboot (at least on Linux).
(In reply to comment #2) > (In reply to comment #1) > > Created an attachment (id=11593) [details] [details] > > Don't try to trap 'ERR' > > > > Matthieu, is this patch okay with you? > > > > Sure, at least as a temporarly way to fix the issue. Committed in 52121e9de907c61a16e41f0f08acecc1dc1546e5. I'll roll 1.0.7 later today. > When I'll have some time to revisit the issue, I'll add some autoconf magic > to detect if a bourne-like shell with ERR support is available and use it > in that case. At least for my case, ERR was one of the main reason that causes > startx to leave .serverauth files around. I'm not sure whether that will work. Say you build xinit with having bash as /bin/sh. Later you switch /bin/sh over from bash to dash, which will cause startx to break.
This bug could be closed as the fix went into the tree, right? At least on Gentto linux with x11-apps/xinit-1.0.8-r3 the ERR trap is gone. True, I did not bother to investigate what Gentoo patches were applied. But if Tilman said it was applied ...?
Would nice to see the patches that move the serverauth files to /tmp, but for now I'm closing this. Thanks for the remainder.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.