Start child process
(self)
| 108 | self._target(*self._args, **self._kwargs) |
| 109 | |
| 110 | def start(self): |
| 111 | ''' |
| 112 | Start child process |
| 113 | ''' |
| 114 | self._check_closed() |
| 115 | assert self._popen is None, 'cannot start a process twice' |
| 116 | assert self._parent_pid == os.getpid(), \ |
| 117 | 'can only start a process object created by current process' |
| 118 | assert not _current_process._config.get('daemon'), \ |
| 119 | 'daemonic processes are not allowed to have children' |
| 120 | _cleanup() |
| 121 | self._popen = self._Popen(self) |
| 122 | self._sentinel = self._popen.sentinel |
| 123 | # Avoid a refcycle if the target function holds an indirect |
| 124 | # reference to the process object (see bpo-30775) |
| 125 | del self._target, self._args, self._kwargs |
| 126 | _children.add(self) |
| 127 | |
| 128 | def interrupt(self): |
| 129 | ''' |
no test coverage detected