[OpenSIPS-Users] does lua_exec supports async and launch

Johan De Clercq Johan at democon.be
Thu Oct 15 08:37:25 EST 2020


yes indeed, that will take a while to make this working.

Op do 15 okt. 2020 om 10:33 schreef Răzvan Crainea <razvan at opensips.org>:

> 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 :(.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> 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
> >> http://www.opensips-solutions.com
> >>
> >> 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 ?
> >>>
> >>>
> >>> wkr,
> >>>
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at lists.opensips.org
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201015/987c848c/attachment-0001.html>


More information about the Users mailing list