Skip to content

Commit

Permalink
fifo: fix bug introduced in bcf1bb6
Browse files Browse the repository at this point in the history
apparently `os.mkfifo` does not create the fifo with the requested
permissions (`0o666` which is the default anyway), preventing opensips
from writing into it - therefore an explicit chmod is required.
Thanks to @Liviuc and @digipigeon for troubleshooting and providing the
fix
  • Loading branch information
razvancrainea committed Apr 25, 2023
1 parent 7e92e5b commit 114ee4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opensipscli/communication/fifo.py
Expand Up @@ -59,7 +59,8 @@ def execute(method, params):
format(reply_fifo_file, ex))

try:
os.mkfifo(reply_fifo_file, 0o666)
os.mkfifo(reply_fifo_file)
os.chmod(reply_fifo_file, 0o666)
except OSError as ex:
raise jsonrpc_helper.JSONRPCException(
"cannot create reply file {}: {}!".
Expand Down

1 comment on commit 114ee4d

@greenbea
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be backported to 0.2.0?

Please sign in to comment.