1 --- Python-2.7.6/Modules/posixmodule.c.~1~ 2013-11-09 23:36:41.000000000 -0800
2 +++ Python-2.7.6/Modules/posixmodule.c 2014-05-14 13:22:52.461187524 -0700
3 @@ -6603,16 +6603,34 @@
4 "closerange(fd_low, fd_high)\n\n\
5 Closes all file descriptors in [fd_low, fd_high), ignoring errors.");
8 +close_func(void *lohi, int fd)
10 + int lo = ((int *)lohi)[0];
11 + int hi = ((int *)lohi)[1];
22 posix_closerange(PyObject *self, PyObject *args)
24 int fd_from, fd_to, i;
27 if (!PyArg_ParseTuple(args, "ii:closerange", &fd_from, &fd_to))
29 Py_BEGIN_ALLOW_THREADS
30 - for (i = fd_from; i < fd_to; i++)
31 - if (_PyVerify_fd(i))
36 + fdwalk(close_func, lohi);