[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: runaway .xsession-errors vs. temp races: a compromise?



On Tue, Jul 06, 2004 at 02:28:33AM -0700, Chris Waters wrote:
>  "* Modify Xsession to always append to the error file, closing a temporary
>     file race condition window if it has to fall back to using tempfile(1) to
>     create an X session error file.  Because it always appends now, log the
>     fact that the session has started, the username, and the date to the X
>     session error file once it is successfully opened.  Document this change
>     in behavior in Xsession(5)."
> 
> Ok, that makes perfect sense if the error file is created by
> tempfile(1), and lives in /tmp.  But by default, it's not and it
> doesn't.  And people are used to the error file getting truncated.
> The new always-append behavior is going to surprise a lot of people,
> and upset a few.  So, I'd like to toss out the suggestion that we go
> back to truncating the file in the default case (not in /tmp).
> 
> I even made a patch for your consideration.

For the time being, I do not agree.

Justification #1: Xsession is a conffile and anybody who's annoyed by this
can apply your patch or a similar one themselves.

Justification #2: I think programs and libraries -- especially GTK+ and Qt
and their dependent hordes -- need to be broken of the philosophy that
.xsession-errors is just another name for /dev/null.  Anything that spews
gouts of garbage to the file needs a bug filed against it, and I strongly
encourage you to do so.

I didn't get the memo that said .xsession-errors is supposed to be useless,
and I resent the Desktop Movement for trying to make it thus.

> (It can be modified to use "echo -n > $ERRFILE" or "cat /dev/null >
> $ERRFILE" if my idiom of ": > $ERRFILE" seems too obscure.)

Not at all; I use it myself.  I eschew useless uses of cat (and echo)!

-- 
G. Branden Robinson                |    It may be difficult to to determine
Debian GNU/Linux                   |    where religious beliefs end and
branden@debian.org                 |    mental illness begins.
http://people.debian.org/~branden/ |    -- Elaine Cassel

Attachment: signature.asc
Description: Digital signature


Reply to: