def pause(self):
"""Pause the process by sending a SIGSTOP to the child"""
try:
self.command_process.stdin.write("STOP\n")
self.command_process.stdin.flush()
except IOError as exc:
if exc.errno == 32: # Broken pipe, guard exited
return
raise
item = self.resp_queue.get()
if item[1] != "STOP" and item[1] is not None:
raise SandboxError("Bad response from jailguard after pause, %s"
% (item,))
评论列表
文章目录