[OpenSIPS-Users] does lua_exec supports async and launch
razvan at opensips.org
Thu Oct 15 08:28:32 EST 2020
No, not fdopen, that will just open a FILE* out of a file descriptor.
The async mechanism works directly with a file descriptor.
I've quickly checked the lua API, and I couldn't see any mechanisms that
you could use - in this case, you should probably "simulate" an external
process that gets "lua jobs" and executes them asynchronously, and
returns a file descriptor that can be tracked down to see the whether
the exec completed. I'll have to admit, this doesn't see easy :(.
OpenSIPS Core Developer
On 9/29/20 7:50 PM, johan wrote:
> You refer to fdopen in Ansi C ?
> On 28/09/2020 09:43, Răzvan Crainea wrote:
>> Hi, Johan!
>> Unfortunately the lua module does not support asynchronous operations.
>> TBH, I'm not that familiar with the module, so I really don't know
>> exactly how it gets executed, but in order to add async support, we
>> need the lua mechanism to provide us a file descriptor (or somehting
>> similar) that get signaled when an operation is completed. Or at least
>> provide some mechanisms to run scripts asynchronous and provide a
>> callback that indicates when the script has finished.
>> Best regards,
>> Răzvan Crainea
>> OpenSIPS Core Developer
>> On 9/25/20 11:34 AM, johan wrote:
>>> does lua_exec supports async calls ?
>>> If no, can you please indicate what needs to be added to have this
>>> support ?
>>> Users mailing list
>>> Users at lists.opensips.org
>> Users mailing list
>> Users at lists.opensips.org
> Users mailing list
> Users at lists.opensips.org
More information about the Users