os.execute

54 views
Skip to first unread message

Brian C

unread,
Feb 27, 2015, 12:52:15 PM2/27/15
to openre...@googlegroups.com
Hello,

Is there a non-blocking alternative for os.execute?

Thanks,:]

Yichun Zhang (agentzh)

unread,
Feb 27, 2015, 9:27:48 PM2/27/15
to openresty-en
Hello!

On Fri, Feb 27, 2015 at 9:52 AM, Brian C wrote:
> Is there a non-blocking alternative for os.execute?
>

Not really. I've been thinking about adding support for nonblocking
pipe for similar things but I am always worried about the inherent big
overhead in the execve() and clone() syscalls (especially the former)
and I'm not sure if it's worth the effort.

Maybe the following approach works better for such requirements in
nginx's context:

https://github.com/juce/lua-resty-shell

Regards,
-agentzh
Reply all
Reply to author
Forward
0 new messages