diff --git a/backend/api.js b/backend/api.js index 86cdb0c..5afeaf2 100644 --- a/backend/api.js +++ b/backend/api.js @@ -442,7 +442,7 @@ export class Session { // block signals. Killing the foreground process (i.e. pid1) // should cause the Docker runtime to bring everything else // down in flames. - this.container.proc.kill(); + this.container.proc.stdin.end(); } allSessions.delete(this); this.ws.terminate(); diff --git a/system/src/riju-system-privileged.c b/system/src/riju-system-privileged.c index 44a0f6b..506d5bc 100644 --- a/system/src/riju-system-privileged.c +++ b/system/src/riju-system-privileged.c @@ -51,7 +51,7 @@ void session(char *uuid, char *lang) char *argv[] = { "docker", "run", - "--rm", + "--rm", "-i", "-e", "HOME=/home/riju", "-e", "HOSTNAME=riju", "-e", "LANG=C.UTF-8", @@ -66,7 +66,7 @@ void session(char *uuid, char *lang) "-e", "USERNAME=riju", "--hostname", "riju", "--name", container, - image, "tail", "-f", "/dev/null", NULL, + image, "cat", NULL, }; execvp(argv[0], argv); die("execvp failed");