moonbridge

diff reference.txt @ 205:5601a486e68a

Support asynchronous I/O with stdin/stdout/stderr of executed child processes
author jbe
date Sun Jun 21 20:10:21 2015 +0200 (2015-06-21)
parents 97d3ca77c86a
children 35ea31e45b43
line diff
     1.1 --- a/reference.txt	Sun Jun 21 02:49:23 2015 +0200
     1.2 +++ b/reference.txt	Sun Jun 21 20:10:21 2015 +0200
     1.3 @@ -292,6 +292,33 @@
     1.4  listed below.
     1.5  
     1.6  
     1.7 +### moonbridge_io.exec(command, arg1, arg2, ...)
     1.8 +
     1.9 +Executes the given command and returns a handle with three sockets named
    1.10 +"stdin", "stdout", and "stderr" as well as the following methods:
    1.11 +
    1.12 +- :kill(signal)
    1.13 +- :wait()
    1.14 +- :wait_nb()
    1.15 +- :wait_call(waitfunc) 
    1.16 +- :wait_yield()
    1.17 +
    1.18 +Use :kill(signal) to terminate the process with the given signal (defaults to
    1.19 +SIGTERM).
    1.20 +
    1.21 +The :wait() method will wait for the process to terminate and return its exit
    1.22 +code. If the process was terminated by a signal, a negative integer is returned
    1.23 +which corresponds to the respective positive signal number.
    1.24 +
    1.25 +The method :wait_nb() is the same as :wait(), except that it does not block but
    1.26 +returns nil if the child process has not terminated yet.
    1.27 +
    1.28 +The method :wait_call() is the same as :wait() but calls waitfunc() (in an
    1.29 +infinite loop) as long as the process is still running.
    1.30 +
    1.31 +The method :wait_yield() is an alias for :wait_call(coroutine.yield).
    1.32 +
    1.33 +
    1.34  ### moonbridge_io.localconnect(path)
    1.35  
    1.36  Tries to connect to a local socket (also known as Unix Domain Socket). Returns

Impressum / About Us