moonbridge
diff reference.txt @ 266:48ffca6443d9
Added moonbridge_io.signalsocket(...) and moonbridge_io.getpid() functions; poll returns true on signal interruption (instead of nil)
author | jbe |
---|---|
date | Sun Jun 04 16:40:46 2017 +0200 (2017-06-04) |
parents | 6bcdddff1ddd |
children | 5f437005e2ef |
line diff
1.1 --- a/reference.txt Sun Jun 04 13:49:12 2017 +0200 1.2 +++ b/reference.txt Sun Jun 04 16:40:46 2017 +0200 1.3 @@ -386,9 +386,19 @@ 1.4 nil, it is treated as being empty. 1.5 1.6 Returns true when at least one file descriptor or handle is ready for reading 1.7 -or writing respectively. Returns false (plus a notice as second return value) 1.8 -in case of timeout. Returns nil (plus a notice as second return value) if a 1.9 -signal was received during waiting. 1.10 +or writing respectively, or if a signal has been received during waiting. 1.11 +Returns false (plus a notice as second return value) in case of timeout. 1.12 + 1.13 + 1.14 +### moonbridge_io.signalsocket(signal, ...) 1.15 + 1.16 +This function installs a signal handler for the signals with the numbers passed 1.17 +as arguments and returns a socket which receives a byte for each received 1.18 +signal. 1.19 + 1.20 +Subsequent calls of this function can extend the set of signals but will always 1.21 +return the same socket. If the socket is closed, it is no longer possible to 1.22 +detect signals until the process is terminated. 1.23 1.24 1.25 ### moonbridge_io.tcpconnect(hostname, port)