From: sthen Date: Wed, 19 Oct 2022 21:23:31 +0000 (+0000) Subject: Exclude /tmp/*.shm files from /tmp cleaning in daily(8); removing them X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ca6cf7e7eb848862ff4c0c06aa2c462bff0241d5;p=openbsd Exclude /tmp/*.shm files from /tmp cleaning in daily(8); removing them interferes with programs using shm_open(3) which uses them as backing files. Problem pointed out by jeremy@ in relation to PostgreSQL. Suggestion/ok tb@. --- diff --git a/etc/daily b/etc/daily index d33d893d6cd..96d6ac4cc92 100644 --- a/etc/daily +++ b/etc/daily @@ -1,5 +1,5 @@ # -# $OpenBSD: daily,v 1.95 2020/10/20 22:42:29 danj Exp $ +# $OpenBSD: daily,v 1.96 2022/10/19 21:23:31 sthen Exp $ # From: @(#)daily 8.2 (Berkeley) 1/25/94 # # For local additions, create the file /etc/daily.local. @@ -49,8 +49,8 @@ if [ -d /tmp -a ! -L /tmp ]; then cd /tmp && { find -x . \ \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \ - -o -path './tmux-*' \) \ - -prune -o -type f -atime +7 -delete 2>/dev/null + -o -path './tmux-*' \) -prune -o \ + -type f -and ! -path './*.shm' -atime +7 -delete 2>/dev/null find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ ! -path ./.ICE-unix ! -name . \ -delete >/dev/null 2>&1; }