mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
vere: restores ctrl-c on windows, fixes latent handle precision bug
This commit is contained in:
parent
75b5f51a45
commit
618f92360a
@ -542,7 +542,7 @@ _cw_usage(c3_c* s)
|
||||
" %s queu <pier> <at-event> cue state:\n"
|
||||
"\n run as a 'serf':\n"
|
||||
" %s serf <pier> <key> <flags> <cache-size> <at-event>"
|
||||
#if defined(U3_OS_mingw) && defined(U3_INTERRUPT_EVENT)
|
||||
#ifdef U3_OS_mingw
|
||||
" <ctrlc-handle>"
|
||||
#endif
|
||||
"\n",
|
||||
@ -847,14 +847,14 @@ _cw_serf_commence(c3_i argc, c3_c* argv[])
|
||||
c3_i inn_i, out_i;
|
||||
_cw_serf_stdio(&inn_i, &out_i);
|
||||
|
||||
#if defined(U3_OS_mingw) && defined(U3_INTERRUPT_EVENT)
|
||||
#ifdef U3_OS_mingw
|
||||
c3_assert( 8 == argc );
|
||||
|
||||
// Initialize serf's end of Ctrl-C handling
|
||||
//
|
||||
{
|
||||
HANDLE h;
|
||||
if ( 1 != sscanf(argv[7], "%u", &h) ) {
|
||||
if ( 1 != sscanf(argv[7], "%" PRIu64, &h) ) {
|
||||
fprintf(stderr, "serf: Ctrl-C event: bad handle %s: %s\r\n", argv[7], strerror(errno));
|
||||
} else
|
||||
if ( !RegisterWaitForSingleObject(&h, h, _mingw_ctrlc_cb, NULL, INFINITE, 0) ) {
|
||||
@ -1335,7 +1335,7 @@ main(c3_i argc,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(U3_OS_mingw) && defined(U3_INTERRUPT_EVENT)
|
||||
#ifdef U3_OS_mingw
|
||||
// Initialize event used to transmit Ctrl-C to worker process
|
||||
//
|
||||
{
|
||||
|
@ -603,7 +603,7 @@ _king_sign_cb(uv_signal_t* sil_u, c3_i num_i)
|
||||
u3l_log("\r\ninterrupt\r\n");
|
||||
u3_term_ef_ctlc();
|
||||
|
||||
#if defined(U3_OS_mingw) && defined(U3_INTERRUPT_EVENT)
|
||||
#ifdef U3_OS_mingw
|
||||
PulseEvent(u3_Host.cev_u);
|
||||
#endif
|
||||
break;
|
||||
|
@ -1190,8 +1190,8 @@ u3_lord_init(c3_c* pax_c, c3_w wag_w, c3_d key_d[4], u3_lord_cb cb_u)
|
||||
arg_c[6] = "0";
|
||||
}
|
||||
|
||||
#if defined(U3_OS_mingw) && defined(U3_INTERRUPT_EVENT)
|
||||
sprintf(cev_c, "%u", u3_Host.cev_u);
|
||||
#ifdef U3_OS_mingw
|
||||
sprintf(cev_c, "%" PRIu64, u3_Host.cev_u);
|
||||
arg_c[7] = cev_c;
|
||||
arg_c[8] = 0;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user