If I run 'python -i subprocessclien t.py' I expect to see the nice
level of it go up 2, and the nice level of the subprocess go up 1.
But all I see is the nice level of the client change. What am I doing
wrong?
subprocessserve r.py:
----------------------------
#!/usr/bin/python2.5
import os
import sys
while True:
next_line = sys.stdin.readl ine()
if not next_line:
break
exec(next_line)
# sys.stdout.writ e(output)
# sys.stdout.writ e(next_line)
# sys.stdout.flus h()
----------------------------
subprocessclien t.py:
----------------------------
#!/usr/bin/python2.5
import subprocess, os
server = subprocess.Pope n(('python2.5', 'subprocessserv er.py'),
shell=True, stdin=subproces s.PIPE, stdout=subproce ss.PIPE,
stderr=subproce ss.PIPE)
os.nice(2)
server.stdin.wr ite('''os.nice( 1)''')
----------------------------
Thanks.
-Chuckk
--
level of it go up 2, and the nice level of the subprocess go up 1.
But all I see is the nice level of the client change. What am I doing
wrong?
subprocessserve r.py:
----------------------------
#!/usr/bin/python2.5
import os
import sys
while True:
next_line = sys.stdin.readl ine()
if not next_line:
break
exec(next_line)
# sys.stdout.writ e(output)
# sys.stdout.writ e(next_line)
# sys.stdout.flus h()
----------------------------
subprocessclien t.py:
----------------------------
#!/usr/bin/python2.5
import subprocess, os
server = subprocess.Pope n(('python2.5', 'subprocessserv er.py'),
shell=True, stdin=subproces s.PIPE, stdout=subproce ss.PIPE,
stderr=subproce ss.PIPE)
os.nice(2)
server.stdin.wr ite('''os.nice( 1)''')
----------------------------
Thanks.
-Chuckk
--
Comment