[sr-dev] [kamailio/kamailio] exec_cmd is getting Resource temporarily unavailable error (#2538)

Daniel-Constantin Mierla notifications at github.com
Tue Nov 3 13:02:28 CET 2020


The log message suggests the command execution was interrupted, generating SIGPIPE (13). That can happen because it took too long. There is no reason that exec_avp() can do it faster than exec_cmd(), actually the first one does longer processing, but can get another error handling path because it expects to read the output of the command to store in avps, so the error can be different.

If you do not need to wait for the command to complete, run it in background by adding `&` at the end of the command. Also redirect the output to /dev/null just in case the command prints messages in various cases.

Overall, the code of the function is really minimal, practically popen() and pclose(), plus handing the exit status. Apart of not printing the error log, is not much that can be adjusted there. if you want to discuss further, let's do it on the sr-users mailing list.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2538#issuecomment-721075000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20201103/60cebd99/attachment.htm>


More information about the sr-dev mailing list