$NetBSD: patch-aa,v 1.3 2007/01/15 23:40:46 wiz Exp $ --- manlifter.orig 2006-12-25 07:43:35.000000000 +0000 +++ manlifter @@ -316,7 +316,8 @@ def massrun(files, options): signal.signal(signal.SIGUSR2, report) signal.signal(signal.SIGHUP, bailout) signal.signal(signal.SIGINT, bailout) - signal.signal(signal.SIGPWR, bailout) + if sys.platform != 'darwin': + signal.signal(signal.SIGPWR, bailout) signal.signal(signal.SIGTERM, bailout) print "%Test started", time.ctime(), "\n" try: @@ -584,22 +585,17 @@ def doclifter_driver(options, arguments) fp.close() if __name__ == "__main__": - # Find a copy of doclifter - for pathdir in ["."] + os.environ["PATH"].split(":"): - where = os.path.join(pathdir, "doclifter") - if os.path.exists(where): - break - else: - sys.stderr.write("manlifter: can't find doclifter!\n") - sys.exit(1) - # Import it, so we can modify it while the test is running without - # screwing up the results + import imp + fp = open('@@BIN_PATH@@/doclifter') try: - os.system("cp %s doclifter_test%s.py" % (where, os.getpid())) - exec 'import doclifter_test%s' % os.getpid() - exec "doclifter=doclifter_test%s" % os.getpid() + try: + doclifter = imp.load_module('doclifter', fp, '@@BIN_PATH@@/doclifter', ('.py', 'U', 1)) + except ImportError: + sys.stderr.write("manlifter: can't find doclifter!") + sys.exit(1) finally: - os.system("rm -f doclifter_test%s.py*" % os.getpid()) + if fp: + fp.close() # Gather options (options, arguments) = getopt.getopt(sys.argv[1:], "d:ef:hI:p:qs:Sv") # Do the real work