Author vstinner
Recipients Aaron.Sherman, gregory.p.smith, vstinner
Date 2011-02-24.23:43:10
SpamBayes Score 1.05804e-09
Marked as misclassified No
Message-id <>
Python 3.2 has a _posixsubprocess: some parts of subprocess are implemented in C. Can you try it?

Python 3.2 uses also pipe2(), if available, to avoid the extra fcntl(4, F_GETFD)+fcntl(4, F_SETFD, FD_CLOEXEC).

I suppose that the pipe and mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) is used by subprocess to transfer a Python exception from the child process. Python 2.7 encodes the exception value, type and traceback using pickle, and the parent process calls Python 3.2 only encodes the exception value and type using a simple string, the parent process uses bytearray with chunks of 50,000 bytes (stop when the total size is bigger than 50,000 bytes). So I suppose that Python 3.2 allocates less memory in the parent process to read the child exception (if any).

You may also try to change Popen buffer size, but it should not change anything if you test "exit 0".
Date User Action Args
2011-02-24 23:43:12vstinnersetrecipients: + vstinner, gregory.p.smith, Aaron.Sherman
2011-02-24 23:43:12vstinnersetmessageid: <>
2011-02-24 23:43:11vstinnerlinkissue11314 messages
2011-02-24 23:43:10vstinnercreate