diff --git a/src/protocol.c b/src/protocol.c index e4204cb..9f1ada5 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -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); @@ -401,4 +403,4 @@ callback_tty(struct lws *wsi, enum lws_callback_reasons reason, } return 0; -} \ No newline at end of file +}