New submission from albert hofkamp <[EMAIL PROTECTED]>: shutil.copytree() uses shutil.copyfile() to copy files recursively. shutil.copyfile() opens the source file for reading, and the destination file for writing, followed by a call to shutil.copyfileobj().
If the file happens to be a named pipe rather than a normal file, opening for read blocks the copying function, since the Unix OS needs a writer process to attach to the same named pipe before the open-for-read succeeds. Rather than opening the file for reading, the correct action would probably be to simply create a new named pipe with the same name at the destination. Looking at the Python2.3 code, the same type of problem seem to exist for other non-normal file-types other than symlinks (eg device files, sockets, and possibly a few others). ---------- components: Library (Lib) messages: 67498 nosy: aioryi severity: normal status: open title: shutil.copyfile blocks indefinitely on named pipes type: behavior versions: Python 2.3 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3002> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com