Tear down old containers properly

This commit is contained in:
Radon Rosborough 2021-03-21 13:55:33 -07:00
parent 219fbed342
commit 4a79b95efc
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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");