1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00

11 Commits

Author SHA1 Message Date
Pleuvens
011a1ac1a3
test: switch to new-style ASSERT_EQ macros (#4159)
Switch from old-style ASSERT macro to new-style ASSERT_EQ,... macros.

Using new-style macros makes it easier to debug test failures

Fixes: https://github.com/libuv/libuv/issues/2974
2023-10-06 19:50:15 +02:00
Trevor Norris
91a7e49846
test: silence more valgrind warnings (#3917)
Pass the loop to MAKE_VALGRIND_HAPPY() so it's explicit on which loop
needs to be cleaned up. Since it asserts on uv_loop_close(), need to
remove a couple of those that were being done before the call.

Cleanup where loop was assigned, so the entire test either uses loop or
uv_default_loop(). Not both.

Also take care of any reqs that may have been left uncleaned.
2023-03-12 14:59:00 +01:00
Bartosz Sosnowski
890eedaf59 win, process: uv_kill improvements
Maps pid 0 to the current process, simulating Linux kill sending signal
to the process group.

Adds detection of invalid signals. If the signum is invalid - below 0
or NSIG or above – UV_EINVAL will be returned instead of UV_ENOSYS.

PR-URL: https://github.com/libuv/libuv/pull/1642
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-07 14:00:05 +01:00
Santiago Gimeno
45616f542d
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>
2017-02-28 14:16:54 +01:00
Bartosz Sosnowski
c66f265b5d win,signal: fix potential deadlock
Trying to remove the controller from the controller handle itself
leads to deadlock. Fix it by always having the global signal handler
engaged.

Ref: https://github.com/nodejs/node/issues/10165
PR-URL: https://github.com/libuv/libuv/pull/1168
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-01-17 21:22:56 -06:00
Saúl Ibarra Corretgé
db2a9072bc unix, windows: removed unused status parameter
async, timer, prepare, idle and check handles don't need the status
parameter.
2014-03-17 21:42:36 +01:00
Ben Noordhuis
4ba03ddd56 unix, windows: rename uv_run2 to uv_run
This changes the prototype of uv_run() from:

  int uv_run(uv_loop_t* loop);

To:

  int uv_run(uv_loop_t* loop, uv_run_mode mode);

Where `mode` is UV_RUN_DEFAULT, UV_RUN_ONCE or UV_RUN_NOWAIT.

Fixes #683.
2013-01-16 23:35:29 +01:00
Bert Belder
47eb03490a test: move loop cleanup code to the individual tests 2012-10-17 01:24:49 +02:00
Bert Belder
28eb619c65 windows: don't run signal tests
They are dummy tests on windows, running them is misleading.
Also remove duplicate 'test-signal.c' entry from uv.gyp.
2012-10-16 17:23:04 +02:00
Bert Belder
762c85c3ef windows: un-break the build 2012-08-13 22:31:45 +02:00
Ben Noordhuis
ee50db6e36 unix, windows: preliminary signal handler support
* a no-op on Windows for now
* only supports the main loop on UNIX (again, for now)
2012-08-10 02:00:07 +02:00