Fix pidfile access

This commit is contained in:
Labrys of Knossos 2022-12-14 04:12:37 -05:00
commit e8f7f5cece

View file

@ -88,7 +88,8 @@ class PosixProcess:
if not self.lasterror:
if self.lock_socket:
self.lock_socket.close()
self.pidpath.unlink(missing_ok=True)
if self.pidpath.is_file():
self.pidpath.unlink()
ProcessType = typing.Type[typing.Union[PosixProcess, WindowsProcess]]