mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-23 04:14:18 +01:00
Close the websocket after forking so that child processes don't prevent new connections (#162)
This commit is contained in:
@@ -180,6 +180,8 @@ thread_run_command(void *args) {
|
||||
perror("setenv");
|
||||
pthread_exit((void *) 1);
|
||||
}
|
||||
// Don't pass the web socket onto child processes
|
||||
close(lws_get_socket_fd(client->wsi));
|
||||
if (execvp(server->argv[0], server->argv) < 0) {
|
||||
perror("execvp");
|
||||
pthread_exit((void *) 1);
|
||||
|
||||
Reference in New Issue
Block a user