We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fa4e15 commit 3f72e40Copy full SHA for 3f72e40
1 file changed
common/utils.py
@@ -49,9 +49,10 @@ def pid_file_name(node_type: str, node_name: str) -> str:
49
The name of the file that is used to store the process ID.
50
"""
51
file_name = f"dske-{node_type}-{node_name}.pid"
52
- dir_name = "/var/run"
53
- if os.path.exists(dir_name) and os.access(dir_name, os.W_OK):
+ dir_name = "/tmp" # /var/run would be better, but typically needs root access
+ if os.access(dir_name, os.W_OK):
54
return f"{dir_name}/{file_name}"
55
+ # /tmp does not exist or is not writable, use current directory
56
return file_name
57
58
0 commit comments