moonbridge
diff reference.txt @ 296:ce109800ae2d
Extend moonbridge_io.poll(...) to support waiting for child process termination
author | jbe |
---|---|
date | Sat Jun 17 22:35:44 2017 +0200 (2017-06-17) |
parents | 76bede490cdf |
children | 334ea1f13b0b |
line diff
1.1 --- a/reference.txt Sat Jun 17 20:07:03 2017 +0200 1.2 +++ b/reference.txt Sat Jun 17 22:35:44 2017 +0200 1.3 @@ -310,7 +310,7 @@ 1.4 1.5 ### moonbridge_io.exec(command, arg1, arg2, ...) 1.6 1.7 -Executes the given command and returns a handle with three sockets named 1.8 +Executes the given command and returns a child handle with three sockets named 1.9 "stdin", "stdout", and "stderr" as well as the following methods: 1.10 1.11 - :kill(signal) 1.12 @@ -335,6 +335,9 @@ 1.13 1.14 The method :wait_yield() is an alias for :wait_call(coroutine.yield). 1.15 1.16 +It is possible to wait for process termination by including the child handle 1.17 +in the input_set of the moonbridge_io.poll(...) call. 1.18 + 1.19 moonbridge_io.exec(...) returns nil (as first return value) plus an error 1.20 message (as second return value) in case of error. 1.21 1.22 @@ -399,6 +402,9 @@ 1.23 which does evaluate to true, e.g. input_set = {[socketA] = true}. If a set is 1.24 nil, it is treated as being empty. 1.25 1.26 +The input_set may also contain listeners (to wait for incoming connections) and 1.27 +child handles (to wait for process termination). 1.28 + 1.29 If the 4th parameter (wakeup_on_sigterm) is set to true, then the function 1.30 returns immediately if the process received at least one SIGTERM signal after 1.31 moonbridge_io.catch_sigterm() has been called for the first time. Three values