[issue10897] UNIX mmap unnecessarily dup() file descriptor

2013-08-03 Thread Charles-François Natali
Charles-François Natali added the comment: > This can only be raised (above the hard limit) by a privileged > process, so I would be out of luck there, as I could not convince > my sysadmins to raise this further. We all know that feeling :-) > Meanwhile, I will just use my own module, so feel

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2013-08-02 Thread Lorenz Huedepohl
Lorenz Huedepohl added the comment: > If that's a problem, then the user can raise the RLIMIT_NOFILE. This can only be raised (above the hard limit) by a privileged process, so I would be out of luck there, as I could not convince my sysadmins to raise this further. Anyway, I don't really care

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2013-08-02 Thread Charles-François Natali
Charles-François Natali added the comment: I changed my mind, and think we should keep the current behavior: it guarantees resize() won't break, and doesn't cost much. One extra FD per mmap is not a huge hit. If that's a problem, then the user can raise the RLIMIT_NOFILE. -- _

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-06-14 Thread Facundo Batista
Changes by Facundo Batista : -- nosy: -facundobatista ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-06-11 Thread Charles-François Natali
Charles-François Natali added the comment: > Perhaps by adding some new argument to the mmap constructor? (dup_fd = True) I don't really like the idea of exposing the FD duplication to the user, because: - it's an implementation detail - it doesn't reflect any argument of the POSIX mmap version

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-06-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, I agree on the principle, but it is a change in behaviour and would probably break some user code... Perhaps by adding some new argument to the mmap constructor? (dup_fd = True) -- ___ Python tracker

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-06-09 Thread Charles-François Natali
Charles-François Natali added the comment: Trying to revive this issue. I'm +1 on this change: duping the file descriptor is definitely unexpected and has some side effects. I think we should remove the call to dup and close, it's really the user's responsibility to avoid closing the FD. If th

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-13 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- nosy: +schmir ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread Lorenz Huedepohl
Lorenz Huedepohl added the comment: Thanks SilentGhost, you were much faster than me :) I agree with Antoine, that the dup() is unexpected: It cost me some time to figure out where these additonal file descriptors originated from. One of the powers of mmap() is, that you do not need one, so i

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The problem is that it's a change in semantics. So it definitely can't be backported to the bugfix branches, nor committed into 3.2 which is in feature freeze now. The question is which behaviour is the most expected by users of the module. I'd say that dup(

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread SilentGhost
SilentGhost added the comment: version of the lorenz's patch agains py3k branch. -- Added file: http://bugs.python.org/file20380/mmap.diff ___ Python tracker ___ ___

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread SilentGhost
Changes by SilentGhost : -- nosy: +SilentGhost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report and patch. Can you refresh it against the py3k branch? Bugs are fixed there and then backported to 3.1 and 2.7. If possible, please include a test in your patch. -- nosy: +eric.araujo, facundobatista, georg.brandl, josiahcarlson,

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread Lorenz Huedepohl
New submission from Lorenz Huedepohl : The UNIX mmap version in Modules/mmapmodule.c makes a call to dup() to duplicate the file descriptor that is passed for creating the memory-mapped region. This way, I frequently hit the limit for the number of open file handles while creating mmap.mm