Use rc to start ramfs before execing acme, since the procexec method didn't work. Rc could just as well be pointed at an external shell script to further configure the environment without recompiling. Reference: /n/atom/patch/applied/websocket-rcramfs Date: Tue Mar 4 14:14:08 CET 2014 Signed-off-by: root@davidrhoskin.com --- /sys/src/cmd/ip/httpd/websocket.c Tue Mar 4 14:14:08 2014 +++ /sys/src/cmd/ip/httpd/websocket.c Tue Mar 4 14:14:08 2014 @@ -383,20 +383,11 @@ } void -ramfsproc(void *arg) -{ - Channel *c = (Channel *)arg; - - procexecl(c, "/bin/ramfs", nil); -} - -void mountproc(void *arg) { Procio *pio; int fd, i; char **argv; - Channel *c; pio = (Procio *)arg; fd = pio->fd; @@ -409,11 +400,6 @@ newns("none", nil); - c = chancreate(sizeof(ulong), 0); - - proccreate(ramfsproc, c, STACKSZ); - recv(c, nil); - if(mount(fd, -1, "/dev/", MBEFORE, "") == -1) sysfatal("mount failed: %r"); @@ -505,7 +491,7 @@ }; Procio fromws, tows, frompipe, topipe; Procio mountp, echop; - char *argv[] = {"/bin/acme", nil}; + char *argv[] = {"/bin/rc", "-c", "ramfs; exec acme", nil}; fromws.c = chancreate(sizeof(Wspkt), CHANBUF); tows.c = chancreate(sizeof(Wspkt), CHANBUF);