diff options
| author | Benjamin Peterson <benjamin@python.org> | 2008-06-13 19:13:39 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2008-06-13 19:13:39 (GMT) |
| commit | dfd79494ce78868c937dc91eddd630cbdcae5611 (patch) | |
| tree | 497db9bd37079421b144f33635c6bdd4b7058db5 /Lib/multiprocessing/forking.py | |
| parent | c9798fc7094c8ddcd73cc73870bbe0a1d4b5b1b1 (diff) | |
| download | cpython-dfd79494ce78868c937dc91eddd630cbdcae5611.zip cpython-dfd79494ce78868c937dc91eddd630cbdcae5611.tar.gz cpython-dfd79494ce78868c937dc91eddd630cbdcae5611.tar.bz2 | |
convert multiprocessing to unix line endings
Diffstat (limited to 'Lib/multiprocessing/forking.py')
| -rw-r--r-- | Lib/multiprocessing/forking.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py index 2c1d3cf..6107f07 100644 --- a/Lib/multiprocessing/forking.py +++ b/Lib/multiprocessing/forking.py @@ -92,7 +92,7 @@ if sys.platform != 'win32': except OSError, e:
if self.wait(timeout=0.1) is None:
raise
-
+
@staticmethod
def thread_is_spawning():
return False
@@ -107,10 +107,10 @@ else: import _subprocess
import copy_reg
import time
-
+
from ._multiprocessing import win32, Connection, PipeConnection
from .util import Finalize
-
+
try:
from cPickle import dump, load, HIGHEST_PROTOCOL
except ImportError:
@@ -217,7 +217,7 @@ else: if code == TERMINATE:
code = -signal.SIGTERM
self.returncode = code
-
+
return self.returncode
def poll(self):
@@ -230,7 +230,7 @@ else: except WindowsError:
if self.wait(timeout=0.1) is None:
raise
-
+
#
#
#
@@ -308,7 +308,7 @@ else: Return info about parent needed by child to unpickle process object
'''
from .util import _logger, _log_to_stderr
-
+
d = dict(
name=name,
sys_path=sys.path,
@@ -317,7 +317,7 @@ else: orig_dir=process.ORIGINAL_DIR,
authkey=process.current_process().get_authkey(),
)
-
+
if _logger is not None:
d['log_level'] = _logger.getEffectiveLevel()
@@ -336,7 +336,7 @@ else: #
# Make (Pipe)Connection picklable
#
-
+
def reduce_connection(conn):
if not Popen.thread_is_spawning():
raise RuntimeError(
@@ -345,7 +345,7 @@ else: )
return type(conn), (Popen.duplicate_for_child(conn.fileno()),
conn.readable, conn.writable)
-
+
copy_reg.pickle(Connection, reduce_connection)
copy_reg.pickle(PipeConnection, reduce_connection)
@@ -367,7 +367,7 @@ def prepare(data): if 'authkey' in data:
process.current_process()._authkey = data['authkey']
-
+
if 'log_to_stderr' in data and data['log_to_stderr']:
util.log_to_stderr()
|
