Sha256: bedb324d57b3ff2e6d6ba2a2a46b6f8e67a81186f3c729ea9f3b2771ec9b6450
Contents?: true
Size: 785 Bytes
Versions: 8
Compression:
Stored size: 785 Bytes
Contents
/* * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ #include "git2_util.h" #include <windows.h> #include "cli.h" static void (*interrupt_handler)(void) = NULL; static BOOL WINAPI interrupt_proxy(DWORD signal) { GIT_UNUSED(signal); interrupt_handler(); return TRUE; } int cli_sighandler_set_interrupt(void (*handler)(void)) { BOOL result; if ((interrupt_handler = handler) != NULL) result = SetConsoleCtrlHandler(interrupt_proxy, FALSE); else result = SetConsoleCtrlHandler(NULL, FALSE); if (!result) { git_error_set(GIT_ERROR_OS, "could not set control control handler"); return -1; } return 0; }
Version data entries
8 entries across 8 versions & 1 rubygems