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

Commit

Permalink
windows: fix console signal handler refcount
Browse files Browse the repository at this point in the history
  • Loading branch information
chopdown authored and saghul committed Apr 10, 2014
1 parent deff0e3 commit 0c726e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/win/signal.c
Expand Up @@ -130,8 +130,10 @@ static int uv__signal_register_control_handler() {

/* If the console control handler has already been hooked, just add a */
/* reference. */
if (uv__signal_control_handler_refs > 0)
if (uv__signal_control_handler_refs > 0) {
uv__signal_control_handler_refs++;
return 0;
}

if (!SetConsoleCtrlHandler(uv__signal_control_handler, TRUE))
return GetLastError();
Expand Down

3 comments on commit 0c726e7

@indutny
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erm... missing test?

@saghul
Copy link
Contributor

@saghul saghul commented on 0c726e7 Apr 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I let this one pass as the fix is pretty obvious, the reporter didn't provide one and I don't really know how to write it from the top of my head. In an ideal world we'd have one, yes :-)

@indutny
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so just a complain for our successors then :P

Please sign in to comment.