Comment 1 for bug 1000775

Revision history for this message
Bryce Harrington (bryce) wrote :

The Xsession script already includes functionality for truncating the log:

# truncate ERRFILE if it is too big to avoid disk usage DoS
if [ "`stat -c%s \"$ERRFILE\"`" -gt 500000 ]; then
  T=`mktemp -p "$HOME"`
  tail -c 500000 "$ERRFILE" > "$T" && mv -f "$T" "$ERRFILE" || rm -f "$T"
fi

However I believe this only runs at startup.