This commit is contained in:
Henry Ault 2015-11-03 11:58:48 -08:00
commit 9ad8847c94
6 changed files with 44 additions and 22 deletions

27
.gitignore vendored
View File

@ -1,22 +1,29 @@
# autoconf
/.MAKEFILE-VERSION
/make.conf
/.make.conf
# intermediate
*.swo
*.swp
*.o
/outside/**/*.a
.DS_Store
/bin/urbit
/urb/*/
!/urb/zod/
/outside/re2/obj
/inst
/cmpil
# build
/bin/urbit
/vere.pkg
/.MAKEFILE-VERSION
/make.conf
/.make.conf
node_modules/
.tags
.etags
GPATH
GTAGS
GRTAGS
# scratch
/urb/*/
!/urb/zod/
/zod/
# dependencies
node_modules/
# OS
.DS_Store
# ??
/inst
cscope.*

View File

@ -532,7 +532,8 @@
c3_o gab; // -g
c3_o dem; // -d, daemon
c3_o dry; // -D, dry compute
c3_o fog; // -Xwtf, skip last event
c3_o tex; // -x, exit after loading
c3_o fog; // -X, skip last event
c3_o fak; // -F, fake carrier
c3_o loh; // -L, local-only networking
c3_o pro; // -P, profile

View File

@ -819,7 +819,7 @@ u3e_live(c3_o nuu_o, c3_c* dir_c)
u3P.nor_u.nam_c = "north";
u3P.sou_u.nam_c = "south";
#if 1
#if 0
if ( u3C.wag_w & u3o_dryrun ) {
return c3y;
} else

View File

@ -1128,7 +1128,7 @@ u3m_soft(c3_w sec_w,
{
u3_noun why;
why = u3m_soft_top(sec_w, (1 << 18), fun_f, arg); // 512K pad
why = u3m_soft_top(sec_w, (1 << 20), fun_f, arg); // 2MB pad
if ( 0 == u3h(why) ) {
return why;

View File

@ -647,8 +647,7 @@ u3_lo_loop()
u3_raft_init();
#if 1
if ( _(u3_Host.ops_u.dry) ) {
if ( _(u3_Host.ops_u.tex) ) {
u3t_boff();
u3t_damp();
u3_lo_exit();
@ -656,9 +655,7 @@ u3_lo_loop()
fprintf(stderr, "dry run: exit\r\n");
exit(0);
}
else
#endif
{
else {
if ( c3n == u3_Host.ops_u.bat ) {
uv_run(u3L, UV_RUN_DEFAULT);
}

View File

@ -71,6 +71,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.dem = c3n;
u3_Host.ops_u.fog = c3n;
u3_Host.ops_u.fak = c3n;
u3_Host.ops_u.tex = c3n;
u3_Host.ops_u.pro = c3n;
u3_Host.ops_u.dry = c3n;
u3_Host.ops_u.veb = c3n;
@ -79,7 +80,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.mem = c3n;
u3_Host.ops_u.kno_w = DefaultKernel;
while ( (ch_i = getopt(argc, argv, "I:w:t:X:f:k:l:n:p:r:LabcdgqvFMPD")) != -1 ) {
while ( (ch_i=getopt(argc, argv,"I:w:t:f:k:l:n:p:r:LabcdgqvxFMPDX")) != -1 ) {
switch ( ch_i ) {
case 'M': {
u3_Host.ops_u.mem = c3y;
@ -99,10 +100,12 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.tic_c = _main_presig(optarg);
break;
}
case 'x': {
u3_Host.ops_u.tex = c3y;
break;
}
case 'X': {
if ( 0 != strcmp("wtf", optarg) ) {
return c3n;
} else u3_Host.ops_u.fog = c3y;
u3_Host.ops_u.fog = c3y;
break;
}
case 'f': {
@ -346,6 +349,7 @@ main(c3_i argc,
exit(1);
}
}
#if 0
if ( 0 == getuid() ) {
chroot(u3_Host.dir_c);
@ -354,6 +358,19 @@ main(c3_i argc,
#endif
u3_ve_sysopt();
// Block profiling signal, which should be delievered to exactly one thread.
//
if ( _(u3_Host.ops_u.pro) ) {
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGPROF);
if ( 0 != pthread_sigmask(SIG_BLOCK, &set, NULL) ) {
perror("pthread_sigmask");
exit(1);
}
}
printf("~\n");
// printf("welcome.\n");
printf("urbit: home is %s\n", u3_Host.dir_c);