diff --git a/sys/src/cmd/webfs/fs.c b/sys/src/cmd/webfs/fs.c index 7f2eb70fd..0d59b3d06 100644 --- a/sys/src/cmd/webfs/fs.c +++ b/sys/src/cmd/webfs/fs.c @@ -756,6 +756,13 @@ fsstart(Srv*) unmount(nil, mtpt); } +static void +fsend(Srv*) +{ + postnote(PNGROUP, getpid(), "shutdown"); + exits(nil); +} + Srv fs = { .start=fsstart, @@ -768,6 +775,7 @@ Srv fs = .write=fswrite, .flush=fsflush, .destroyfid=fsdestroyfid, + .end=fsend, }; void @@ -832,5 +840,5 @@ main(int argc, char *argv[]) } postmountsrv(&fs, service, mtpt, MREPL); - exits(0); + exits(nil); } diff --git a/sys/src/cmd/webfs/http.c b/sys/src/cmd/webfs/http.c index 7e3f001f7..5f067aada 100644 --- a/sys/src/cmd/webfs/http.c +++ b/sys/src/cmd/webfs/http.c @@ -240,7 +240,7 @@ hclose(Hconn *h) /* free the tail */ hcloseall(x); } while(i); - exits(0); + exits(nil); } return; } @@ -492,7 +492,7 @@ Again: static void catch(void *, char *msg) { - if(strstr("alarm", msg) || strstr("die", msg)) + if(strstr("alarm", msg) != nil) noted(NCONT); else noted(NDFLT); @@ -710,7 +710,7 @@ http(char *m, Url *u, Key *shdr, Buq *qbody, Buq *qpost) }else h->keep = 0; if(pid == 0) - exits(0); + exits(nil); } /* no timeout when posting */ alarm(0); @@ -1000,5 +1000,5 @@ http(char *m, Url *u, Key *shdr, Buq *qbody, Buq *qpost) shdr = k->next; free(k); } - exits(0); + exits(nil); }