# Path: python/gup/log.py
# def getLogger(*a):
# 	logger = logging.getLogger(*a)
# 	logger.addFilter(_color_filter)
# 	return logger
# 
# Path: python/gup/error.py
# class SafeError(Exception):
# 	exitcode = 10
# 	pass
# 
# UNKNOWN_ERROR_CODE = 1


import tempfile
					import traceback
	import fcntl
	import os, errno, select, signal
from .log import getLogger
from .error import SafeError, UNKNOWN_ERROR_CODE
			try:
				try:
					rv = jobfunc() or 0
					_debug('jobfunc completed (%r, %r)' % (jobfunc,rv))
				except SafeError as e:
					_log.error("%s" % (str(e),))
					rv = SafeError.exitcode
				except KeyboardInterrupt:
					rv = SafeError.exitcode
				except Exception:
					traceback.print_exc()
					rv = UNKNOWN_ERROR_CODE
			finally:
				_debug('exit: %d' % rv)
				os._exit(rv)
		_close_on_exec(r, True)
		os.close(w)
		pd = Job(reason, pid, donefunc)
		self.waitfds[r] = pd

	def wait_all(self):
		"Wait for all jobs to be finished"
		failure = None
		try:
			while self._running():
				while self.tokens >= 1:
					self._release_mine()
				_debug("wait_all: wait()")
				self.wait(want_token=0)
			_debug("wait_all: empty list")

# Path: python/gup/log.py
# def getLogger(*a):
# 	logger = logging.getLogger(*a)
# 	logger.addFilter(_color_filter)
# 	return logger
# 
# Path: python/gup/error.py
# class SafeError(Exception):
# 	exitcode = 10
# 	pass
# 
# UNKNOWN_ERROR_CODE = 1


# Path: python/gup/parallel.py
import tempfile
					import traceback
	import fcntl
	import os, errno, select, signal
from .log import getLogger
from .error import SafeError, UNKNOWN_ERROR_CODE

			try:
				try:
					rv = jobfunc() or 0
					_debug('jobfunc completed (%r, %r)' % (jobfunc,rv))
				except SafeError as e:
					_log.error("%s" % (str(e),))
					rv = SafeError.exitcode
				except KeyboardInterrupt:
					rv = SafeError.exitcode
				except Exception:
					traceback.print_exc()
					rv = UNKNOWN_ERROR_CODE
			finally:
				_debug('exit: %d' % rv)
				os._exit(rv)
		_close_on_exec(r, True)
		os.close(w)
		pd = Job(reason, pid, donefunc)
		self.waitfds[r] = pd

	def wait_all(self):
		"Wait for all jobs to be finished"
		failure = None
		try:
			while self._running():
				while self.tokens >= 1:
					self._release_mine()
				_debug("wait_all: wait()")
				self.wait(want_token=0)
			_debug("wait_all: empty list")

		except SafeError as e: