[New-bugs-announce] [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

Phil Connell report at bugs.python.org
Sat Nov 10 15:36:10 CET 2012


New submission from Phil Connell:

logging.handlers.RotatingFileHandler.doRollover fails on QNX /dev/shmem filesystems (seen on a 6.4.0-based system).

QNX RAM filesystems don't support rename() (see http://www.qnx.com/developers/docs/6.4.0/neutrino/sys_arch/fsys.html#DEVSHMEM - it's a 'big filesystem' feature).

So for example, rename("/dev/shmem/foo", "/dev/shmem/bar") fails with EXDEV.


This is easily fixed by using shutils.move rather than os.rename where appropriate, falling back to copying if a rename() fails. It's not sufficient to set the rotator attribute, since there are other os.rename calls in in doRollover.

----------
components: Library (Lib)
files: rfh_rename_fix.patch
keywords: patch
messages: 175277
nosy: pconnell, vinay.sajip
priority: normal
severity: normal
status: open
title: RotatingFileHandler rollover doesn't work on QNX shmem filesystems
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file27941/rfh_rename_fix.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16449>
_______________________________________


More information about the New-bugs-announce mailing list