mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
Merge branch 'master' of github.com:urbit/urbit
This commit is contained in:
commit
84593e79b0
@ -39,8 +39,8 @@ syn sync linebreaks=1
|
|||||||
syn match hoonNumber "\d\{1,3\}\%(\.\_s\?\d\{3\}\)*"
|
syn match hoonNumber "\d\{1,3\}\%(\.\_s\?\d\{3\}\)*"
|
||||||
syn match hoonNumber "0x\x\{1,4\}\%(\.\_s*\x\{4\}\)*"
|
syn match hoonNumber "0x\x\{1,4\}\%(\.\_s*\x\{4\}\)*"
|
||||||
syn match hoonNumber "0b[01]\{1,4\}\%(\.\_s*[01]\{4\}\)*"
|
syn match hoonNumber "0b[01]\{1,4\}\%(\.\_s*[01]\{4\}\)*"
|
||||||
syn match hoonNumber "0v[0-9a-v]\{1,4\}\%(\.\_s*[0-9a-v]\{4\}\)*"
|
syn match hoonNumber "0v[0-9a-v]\{1,5\}\%(\.\_s*[0-9a-v]\{5\}\)*"
|
||||||
syn match hoonNumber "0w[-~0-9a-zA-Z]\{1,4\}\%(\.\_s*[-~0-9a-zA-Z]\{4\}\)*"
|
syn match hoonNumber "0w[-~0-9a-zA-Z]\{1,5\}\%(\.\_s*[-~0-9a-zA-Z]\{5\}\)*"
|
||||||
|
|
||||||
" comments
|
" comments
|
||||||
|
|
||||||
|
1
f/loom.c
1
f/loom.c
@ -84,7 +84,6 @@ _loom_write(c3_i fid_i, void* buf_w, c3_w len_w)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fsync(fid_i); // for what it's worth
|
|
||||||
return u2_yes;
|
return u2_yes;
|
||||||
}
|
}
|
||||||
// return ((4 * len_w) == write(fid_i, buf_w, (4 * len_w))) ? u2_yes : u2_no;
|
// return ((4 * len_w) == write(fid_i, buf_w, (4 * len_w))) ? u2_yes : u2_no;
|
||||||
|
@ -168,9 +168,10 @@
|
|||||||
/* u2_save: checkpoint control.
|
/* u2_save: checkpoint control.
|
||||||
*/
|
*/
|
||||||
typedef struct _u2_save {
|
typedef struct _u2_save {
|
||||||
uv_timer_t tim_u; // checkpoint timer
|
uv_timer_t tim_u; // checkpoint timer
|
||||||
c3_w ent_w; // event number, XX 64
|
uv_signal_t sil_u; // child signal
|
||||||
c3_w pid_w; // pid of checkpoint process
|
c3_w ent_w; // event number, XX 64
|
||||||
|
c3_w pid_w; // pid of checkpoint process
|
||||||
} u2_save;
|
} u2_save;
|
||||||
|
|
||||||
/* u2_ubuf: unix tty i/o buffer.
|
/* u2_ubuf: unix tty i/o buffer.
|
||||||
|
15
v/save.c
15
v/save.c
@ -17,6 +17,19 @@
|
|||||||
#include "all.h"
|
#include "all.h"
|
||||||
#include "v/vere.h"
|
#include "v/vere.h"
|
||||||
|
|
||||||
|
/* _save_sign_cb: signal callback.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
_save_sign_cb(uv_signal_t* sil_u, c3_i num_i)
|
||||||
|
{
|
||||||
|
uL(fprintf(uH, "save: signal %d\n", num_i));
|
||||||
|
{
|
||||||
|
switch ( num_i ) {
|
||||||
|
case SIGCHLD: u2_save_ef_chld(); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* _save_time_cb(): timer callback.
|
/* _save_time_cb(): timer callback.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -90,6 +103,8 @@ u2_save_io_init(void)
|
|||||||
|
|
||||||
uv_timer_init(u2L, &sav_u->tim_u);
|
uv_timer_init(u2L, &sav_u->tim_u);
|
||||||
uv_timer_start(&sav_u->tim_u, _save_time_cb, 5000, 5000);
|
uv_timer_start(&sav_u->tim_u, _save_time_cb, 5000, 5000);
|
||||||
|
|
||||||
|
uv_signal_start(&sav_u->sil_u, _save_sign_cb, SIGCHLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* u2_save_io_exit(): terminate save I/O.
|
/* u2_save_io_exit(): terminate save I/O.
|
||||||
|
6
v/unix.c
6
v/unix.c
@ -1189,13 +1189,15 @@ _unix_sign_cb(uv_signal_t* sil_u, c3_i num_i)
|
|||||||
u2_lo_open();
|
u2_lo_open();
|
||||||
{
|
{
|
||||||
switch ( num_i ) {
|
switch ( num_i ) {
|
||||||
|
default: fprintf(stderr, "\r\nmysterious signal %d\r\n", num_i); break;
|
||||||
|
|
||||||
case SIGTERM:
|
case SIGTERM:
|
||||||
fprintf(stderr, "\r\ncaught signal %d\r\n", num_i);
|
fprintf(stderr, "\r\ncaught signal %d\r\n", num_i);
|
||||||
u2_Host.liv = u2_no;
|
u2_Host.liv = u2_no;
|
||||||
break;
|
break;
|
||||||
case SIGINT: u2_term_ef_ctlc(); break;
|
case SIGINT: u2_term_ef_ctlc(); break;
|
||||||
case SIGWINCH: u2_term_ef_winc(); break;
|
case SIGWINCH: u2_term_ef_winc(); break;
|
||||||
case SIGCHLD: u2_save_ef_chld(); break;
|
// case SIGCHLD: u2_save_ef_chld(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
u2_lo_shut(u2_yes);
|
u2_lo_shut(u2_yes);
|
||||||
@ -1268,6 +1270,7 @@ u2_unix_io_init(void)
|
|||||||
sig_u->nex_u = unx_u->sig_u;
|
sig_u->nex_u = unx_u->sig_u;
|
||||||
unx_u->sig_u = sig_u;
|
unx_u->sig_u = sig_u;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
{
|
{
|
||||||
u2_usig* sig_u;
|
u2_usig* sig_u;
|
||||||
|
|
||||||
@ -1278,6 +1281,7 @@ u2_unix_io_init(void)
|
|||||||
sig_u->nex_u = unx_u->sig_u;
|
sig_u->nex_u = unx_u->sig_u;
|
||||||
unx_u->sig_u = sig_u;
|
unx_u->sig_u = sig_u;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
u2_unix_ef_move();
|
u2_unix_ef_move();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user