Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: ports/python_modules/ipython/nacl.patch

Issue 138913004: Build system for statically-linked Python. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698