Skip to content

Commit

Permalink
fix: void Xsession fail when $HOME is full
Browse files Browse the repository at this point in the history
When user home is full,
scripts write to a file in user home will failed.

After redirect stdout and stderr to ERRFILE,
aka $HOME/.xsession-errors,
this script echo a line to that file.

This echo might failed and make this script exit with error.
In that case, the session leader will not able to even start.

Releated: linuxdeepin/developer-center#4685
Releated: linuxdeepin/dde-daemon#526
Signed-off-by: black-desk <[email protected]>
  • Loading branch information
black-desk authored and Zeno-sole committed Jun 21, 2023
1 parent e0698cc commit 7b3f3f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion debian/local/Xsession
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ fi

exec >>"$ERRFILE" 2>&1

echo "$PROGNAME: X session started for $LOGNAME at $(date)"
# This echo might fail as we just redirect stderr.
# Just ignore that failure here.
echo "$PROGNAME: X session started for $LOGNAME at $(date)" || true

# sanity check; is our session script directory present?
if [ ! -d "$SYSSESSIONDIR" ]; then
Expand Down

0 comments on commit 7b3f3f1

Please sign in to comment.