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, view it on GitHub, or unsubscribe.