Merge branch 'master' of github.com:urbit/urbit

This commit is contained in:
Curtis Yarvin 2013-10-15 17:58:40 +00:00
commit 84593e79b0
5 changed files with 26 additions and 7 deletions

View File

@ -39,8 +39,8 @@ syn sync linebreaks=1
syn match hoonNumber "\d\{1,3\}\%(\.\_s\?\d\{3\}\)*"
syn match hoonNumber "0x\x\{1,4\}\%(\.\_s*\x\{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 "0w[-~0-9a-zA-Z]\{1,4\}\%(\.\_s*[-~0-9a-zA-Z]\{4\}\)*"
syn match hoonNumber "0v[0-9a-v]\{1,5\}\%(\.\_s*[0-9a-v]\{5\}\)*"
syn match hoonNumber "0w[-~0-9a-zA-Z]\{1,5\}\%(\.\_s*[-~0-9a-zA-Z]\{5\}\)*"
" comments

View File

@ -84,7 +84,6 @@ _loom_write(c3_i fid_i, void* buf_w, c3_w len_w)
exit(1);
}
else {
fsync(fid_i); // for what it's worth
return u2_yes;
}
// return ((4 * len_w) == write(fid_i, buf_w, (4 * len_w))) ? u2_yes : u2_no;

View File

@ -168,9 +168,10 @@
/* u2_save: checkpoint control.
*/
typedef struct _u2_save {
uv_timer_t tim_u; // checkpoint timer
c3_w ent_w; // event number, XX 64
c3_w pid_w; // pid of checkpoint process
uv_timer_t tim_u; // checkpoint timer
uv_signal_t sil_u; // child signal
c3_w ent_w; // event number, XX 64
c3_w pid_w; // pid of checkpoint process
} u2_save;
/* u2_ubuf: unix tty i/o buffer.

View File

@ -17,6 +17,19 @@
#include "all.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.
*/
static void
@ -90,6 +103,8 @@ u2_save_io_init(void)
uv_timer_init(u2L, &sav_u->tim_u);
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.

View File

@ -1189,13 +1189,15 @@ _unix_sign_cb(uv_signal_t* sil_u, c3_i num_i)
u2_lo_open();
{
switch ( num_i ) {
default: fprintf(stderr, "\r\nmysterious signal %d\r\n", num_i); break;
case SIGTERM:
fprintf(stderr, "\r\ncaught signal %d\r\n", num_i);
u2_Host.liv = u2_no;
break;
case SIGINT: u2_term_ef_ctlc(); 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);
@ -1268,6 +1270,7 @@ u2_unix_io_init(void)
sig_u->nex_u = unx_u->sig_u;
unx_u->sig_u = sig_u;
}
#if 0
{
u2_usig* sig_u;
@ -1278,6 +1281,7 @@ u2_unix_io_init(void)
sig_u->nex_u = unx_u->sig_u;
unx_u->sig_u = sig_u;
}
#endif
u2_unix_ef_move();
}