diff options
author | Santiago Gimeno <santiago.gimeno@gmail.com> | 2016-10-23 14:47:31 +0200 |
---|---|---|
committer | Santiago Gimeno <santiago.gimeno@gmail.com> | 2017-02-28 14:16:54 +0100 |
commit | 45616f542da523b3d87a8d379bb116ffc3a97845 (patch) | |
tree | adb8261a8eaedaaaa9e4875c442e804e36afdf65 /docs/src | |
parent | 52ae826492f50f151138ed115faa5e0ac8c803ce (diff) | |
download | libuv-45616f542da523b3d87a8d379bb116ffc3a97845.tar.gz libuv-45616f542da523b3d87a8d379bb116ffc3a97845.zip |
signal: add uv_signal_start_oneshot method
It behaves as `uv_signal_start` but it resets the signal handler as soon
as the signal is received.
Fixes: https://github.com/libuv/libuv/issues/1104
PR-URL: https://github.com/libuv/libuv/pull/1106
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/signal.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/src/signal.rst b/docs/src/signal.rst index dc1223b9..5b3b352b 100644 --- a/docs/src/signal.rst +++ b/docs/src/signal.rst @@ -70,6 +70,13 @@ API Start the handle with the given callback, watching for the given signal. +.. c:function:: int uv_signal_start_oneshot(uv_signal_t* signal, uv_signal_cb cb, int signum) + + .. versionadded:: 1.12.0 + + Same functionality as :c:func:`uv_signal_start` but the signal handler is reset the moment + the signal is received. + .. c:function:: int uv_signal_stop(uv_signal_t* signal) Stop the handle, the callback will no longer be called. |