def open_text_file(self, path):
pid1 = os.fork()
if pid1 == 0:
pid2 = os.fork()
if pid2 == 0:
editor = _unix_editor()
LOG.debug("calling `%s %s'" % (editor, path))
os.execlp(editor, editor, path)
else:
sys.exit(0)
else:
os.waitpid(pid1, 0)
LOG.debug("Exec child exited")
评论列表
文章目录