Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

windows: Always initialize the uv_process_t #1117

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link

The unix implementation of uv_spawn always starts out with a
uv__handle_init, but the windows implementation sometimes bails out early
before calling uv__handle_init. This means that uv_close on a failed
uv_spawn will always succeed on unix but sometimes fail on windows.

This commit lifts the initialization of the uv_process_t above all of the
error checking to ensure that uv_close will always work when uv_spawn
returns an error.

@Nodejs-Jenkins
Copy link

Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion.

Commit alexcrichton/libuv@cf9fbc3 has the following error(s):

  • Commit message line too long: 3
  • Commit message line too long: 7

You can fix all these things without opening another issue.

Please see CONTRIBUTING.md for more information

The unix implementation of uv_spawn always starts out with a
uv__handle_init, but the windows implementation sometimes bails out
early before calling uv__handle_init. This means that uv_close on a
failed uv_spawn will always succeed on unix but sometimes fail on
windows.

This commit lifts the initialization of the uv_process_t above all of
the error checking to ensure that uv_close will always work when
uv_spawn returns an error.
@saghul
Copy link
Contributor

saghul commented Feb 16, 2014

Thanks! Landed in 6f62d62.

@saghul saghul closed this Feb 16, 2014
@alexcrichton alexcrichton deleted the win-spawn branch March 31, 2014 21:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants