fix permissions on pipe

This commit is contained in:
petrucci4prez 2017-06-09 03:39:19 -04:00
parent 35bce93259
commit 95d78767fc
1 changed files with 4 additions and 2 deletions

View File

@ -154,12 +154,14 @@ class PipeListener(ExceptionThread):
pipeMode = 0o0777
if not os.path.exists(self._path):
os.mkfifo(self._path, mode=pipeMode)
os.mkfifo(self._path)
os.chmod(self._path, pipeMode)
else:
st_mode = os.stat(self._path).st_mode
if not stat.S_ISFIFO(st_mode):
os.remove(self._path)
os.mkfifo(self._path, mode=pipeMode)
os.mkfifo(self._path)
os.chmod(self._path, pipeMode)
elif st_mode % 0o10000 != pipeMode:
os.chmod(self._path, pipeMode)