[GH-ISSUE #1418] Websocket and Firejail #964

Closed
opened 2026-05-05 07:13:51 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @sknepal on GitHub (Jul 31, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1418

Hi,

I am using Tornado websocket via a wrapper called Terminado. With xterm.js, I am exposing a sandboxed (using Firejail) terminal to the web. When I expose a normal terminal (without sandboxing), the terminal process gets killed when user closes the connection/browser tab. But, when I expose a Firejailed bash, Firejail process still lingers on even after the user closes his tab and the socket connection is closed. So over time there are like 100s of earlier Firejail process still running on. Is there any solution to this?

Thank you!

Originally created by @sknepal on GitHub (Jul 31, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1418 Hi, I am using Tornado websocket via a wrapper called Terminado. With xterm.js, I am exposing a sandboxed (using Firejail) terminal to the web. When I expose a normal terminal (without sandboxing), the terminal process gets killed when user closes the connection/browser tab. But, when I expose a Firejailed bash, Firejail process still lingers on even after the user closes his tab and the socket connection is closed. So over time there are like 100s of earlier Firejail process still running on. Is there any solution to this? Thank you!
gitea-mirror 2026-05-05 07:13:51 -06:00
Author
Owner

@netblue30 commented on GitHub (Jul 31, 2017):

I'll take a look, thanks.

<!-- gh-comment-id:319040933 --> @netblue30 commented on GitHub (Jul 31, 2017): I'll take a look, thanks.
Author
Owner

@sknepal commented on GitHub (Jul 31, 2017):

I was able to figure out the solution with the help of Terminado's author here. Terminado, by default, terminates the parent process which does not appear to work with Firejail. So I just used subprocess with a call to firejail --shutdown and passed the parent PID to it. That seems to shut everything down. Thank you!

<!-- gh-comment-id:319152590 --> @sknepal commented on GitHub (Jul 31, 2017): I was able to figure out the solution with the help of Terminado's author [here](https://github.com/takluyver/terminado/issues/37). Terminado, by default, terminates the parent process which does not appear to work with Firejail. So I just used subprocess with a call to `firejail --shutdown` and passed the parent PID to it. That seems to shut everything down. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#964
No description provided.