Comment 31 for bug 60448

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote : Re: .xsession_errors file grows out of control & saturates disk space

@Martin,

Can't we add a filter before redirecting to the error file? Instead of:

exec >>"$ERRFILE" 2>&1

we could have

exec | /usr/bin/fifo "2048" "$ERRFILE" 2>&1

fifo is a simple program (a script or even C program) that reads from stdin and writes to an output file while the file size is under a limit of a given number of KB, then it deletes full lines from the start of the file until the file is under the limit again, so it can keep writing. It is pointless to have a xsession-error of more than 2MB (even 1MB seems already too much).