test: Close process handles when spawn fails

This should avoid assertions tripping in debug mode.
This commit is contained in:
Alex Crichton 2014-04-10 07:29:31 -07:00
parent 621c4a3929
commit deff0e3571

View File

@ -171,6 +171,7 @@ TEST_IMPL(spawn_fails) {
r = uv_spawn(uv_default_loop(), &process, &options);
ASSERT(r == UV_ENOENT || r == UV_EACCES);
ASSERT(0 == uv_is_active((uv_handle_t*) &process));
uv_close((uv_handle_t*) &process, NULL);
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
MAKE_VALGRIND_HAPPY();