OLD | NEW |
---|---|
(Empty) | |
1 diff -r f628d005a84e IPython/external/pexpect/_pexpect.py | |
2 --- a/IPython/external/pexpect/_pexpect.py Wed Dec 25 03:31:05 2013 +0000 | |
3 +++ b/IPython/external/pexpect/_pexpect.py Mon Dec 30 16:24:58 2013 +0000 | |
4 @@ -70,7 +70,7 @@ | |
5 import select | |
6 import re | |
7 import struct | |
8 - import resource | |
9 + #import resource | |
10 import types | |
11 import pty | |
12 import tty | |
13 @@ -568,7 +568,8 @@ | |
14 # This is a serious limitation, but not a show stopper. | |
15 pass | |
16 # Do not allow child to inherit open file descriptors from parent. | |
17 - max_fd = resource.getrlimit(resource.RLIMIT_NOFILE)[0] | |
18 + #max_fd = resource.getrlimit(resource.RLIMIT_NOFILE)[0] | |
19 + max_fd = 1024 | |
20 for i in range (3, max_fd): | |
21 try: | |
22 os.close (i) | |
23 diff -r f628d005a84e IPython/utils/io.py | |
24 --- a/IPython/utils/io.py Wed Dec 25 03:31:05 2013 +0000 | |
25 +++ b/IPython/utils/io.py Mon Dec 30 16:24:58 2013 +0000 | |
26 @@ -72,8 +72,15 @@ | |
27 def close(self): | |
28 pass | |
29 | |
30 +class _EmptyWriter: | |
31 + def write(self, *args, **kwargs): | |
32 + pass | |
33 + | |
34 # setup stdin/stdout/stderr to sys.stdin/sys.stdout/sys.stderr | |
35 -devnull = open(os.devnull, 'a') | |
Sam Clegg
2014/01/22 01:46:50
Didn't you recently fix this in nacl_io? Perhaps
Matthew Turk
2014/01/22 21:14:31
Good catch. I've removed the chunk of the patch,
Sam Clegg
2014/01/22 22:22:26
I think you can do MIN_SDK_VERSION=34 in pkg_info
| |
36 +try: | |
37 + devnull = open(os.devnull, 'a') | |
38 +except IOError: | |
39 + devnull = _EmptyWriter() | |
40 stdin = IOStream(sys.stdin, fallback=devnull) | |
41 stdout = IOStream(sys.stdout, fallback=devnull) | |
42 stderr = IOStream(sys.stderr, fallback=devnull) | |
OLD | NEW |