Lines Matching +full:handle +full:- +full:sigint
8 * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
118 epoch_offset = time(NULL) - tv.tv_sec; in logmsg()
126 (int)now->tm_hour, (int)now->tm_min, (int)now->tm_sec, in logmsg()
176 logmsg("Error initialising winsock -- aborting"); in win32_init()
184 logmsg("No suitable winsock.dll found -- aborting"); in win32_init()
221 * -1 = system call error, or invalid timeout value
239 return -1; in wait_ms()
257 if(r != -1) in wait_ms()
262 pending_ms = timeout_ms - (int)timediff(tvnow(), initial_tv); in wait_ms()
265 } while(r == -1); in wait_ms()
268 r = -1; in wait_ms()
285 * - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵ in write_pidfile()
287 * - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵ in write_pidfile()
361 return (char)('A' + in - 'a'); in raw_toupper()
428 max--; in strncasecompare()
471 ** could be the system start-up time, the Epoch, or something else, in tvnow()
484 ** run-time. When this occurs simply fallback to other time source. in tvnow()
529 timediff_t diff = newer.tv_sec-older.tv_sec; in timediff()
534 return (long)(newer.tv_sec-older.tv_sec)*1000+ in timediff()
535 (long)(newer.tv_usec-older.tv_usec)/1000; in timediff()
554 #ifdef SIGINT
568 static HANDLE thread_main_window = NULL;
580 HANDLE exit_event = NULL;
606 * SIGINT, SIGTERM and SIGBREAK on CTRL events and trigger signal handler.
609 * SIGINT is not supported for any Win32 application. When a CTRL+C
611 * to specifically handle that interrupt. This can cause a single-thread
619 * https://docs.microsoft.com/de-de/cpp/c-runtime-library/reference/signal
626 #ifdef SIGINT in ctrl_event_handler()
627 case CTRL_C_EVENT: signum = SIGINT; break; in ctrl_event_handler()
638 logmsg("ctrl_event_handler: %d -> %d", dwCtrlType, signum); in ctrl_event_handler()
648 * to receive and handle the WM_CLOSE message as SIGTERM signal.
662 logmsg("main_window_proc: %d -> %d", uMsg, signum); in main_window_proc()
682 return (DWORD)-1; in main_window_loop()
694 return (DWORD)-1; in main_window_loop()
699 if(ret == -1) { in main_window_loop()
701 return (DWORD)-1; in main_window_loop()
778 #ifdef SIGINT in install_signal_handlers()
779 /* handle SIGINT signal with our exit_signal_handler */ in install_signal_handlers()
780 old_sigint_handler = set_signal(SIGINT, exit_signal_handler, TRUE); in install_signal_handlers()
782 logmsg("cannot install SIGINT handler: %s", strerror(errno)); in install_signal_handlers()
785 /* handle SIGTERM signal with our exit_signal_handler */ in install_signal_handlers()
791 /* handle SIGBREAK signal with our exit_signal_handler */ in install_signal_handlers()
826 #ifdef SIGINT in restore_signal_handlers()
828 (void) set_signal(SIGINT, old_sigint_handler, FALSE); in restore_signal_handlers()