Close the Process object. This method releases resources held by the Process object. It is an error to call this method if the child process is still running.
(self)
| 177 | return False |
| 178 | |
| 179 | def close(self): |
| 180 | ''' |
| 181 | Close the Process object. |
| 182 | |
| 183 | This method releases resources held by the Process object. It is |
| 184 | an error to call this method if the child process is still running. |
| 185 | ''' |
| 186 | if self._popen is not None: |
| 187 | if self._popen.poll() is None: |
| 188 | raise ValueError("Cannot close a process while it is still running. " |
| 189 | "You should first call join() or terminate().") |
| 190 | self._popen.close() |
| 191 | self._popen = None |
| 192 | del self._sentinel |
| 193 | _children.discard(self) |
| 194 | self._closed = True |
| 195 | |
| 196 | @property |
| 197 | def name(self): |