Commit dfd7070c authored by Alex Willmer's avatar Alex Willmer Committed by David Wilson

parent: reuse _=codecs.decode alias in exec'd first stage

SSH command size: 453 (-8 bytes)
Preamble size: 8946 (no change)
parent 53a8c59a
......@@ -323,7 +323,7 @@ class Stream(mitogen.core.Stream):
# replaced with the context name. Optimized for size.
@staticmethod
def _first_stage():
import os,sys,zlib
import os,sys
R,W=os.pipe()
r,w=os.pipe()
if os.fork():
......@@ -337,7 +337,7 @@ class Stream(mitogen.core.Stream):
os.environ['ARGV0']=e=sys.executable
os.execv(e,['mitogen:CONTEXT_NAME'])
os.write(1,'EC0\n')
C=zlib.decompress(sys.stdin.read(input()))
C=_(sys.stdin.read(input()), 'zlib')
os.fdopen(W,'w',0).write(C)
os.fdopen(w,'w',0).write('%s\n'%len(C)+C)
os.write(1,'EC1\n')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment