fix: logging handler must not crash its caller on reopen failure
When decnet.system.log is root-owned (e.g. created by a pre-fix 'sudo
decnet deploy') and a subsequent non-root process tries to log, the
InodeAwareRotatingFileHandler raised PermissionError out of emit(),
which propagated up through logger.debug/info and killed the collector's
log stream loop ('log stream ended ... reason=[Errno 13]').
Now matches stdlib behaviour: wrap _open() in try/except OSError and
defer to handleError() on failure. Adds a regression test.
Also: scripts/profile/view.sh 'pyinstrument' keyword was matching
memray-flamegraph-*.html files. Exclude the memray-* prefix.
This commit is contained in:
@@ -34,7 +34,9 @@ case "${1:-}" in
|
||||
cprofile) TARGET="$(pick_newest '*.prof')" ;;
|
||||
memray) TARGET="$(pick_newest 'memray-*.bin')" ;;
|
||||
pyspy) TARGET="$(pick_newest 'pyspy-*.svg')" ;;
|
||||
pyinstrument) TARGET="$(pick_newest '*.html')" ;;
|
||||
pyinstrument) TARGET="$(find "${DIR}" -maxdepth 1 -type f -name '*.html' \
|
||||
! -name 'memray-*' -printf '%T@ %p\n' 2>/dev/null \
|
||||
| sort -n | tail -n 1 | cut -d' ' -f2-)" ;;
|
||||
*) TARGET="$1" ;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user