New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firejail breaks daemonizing processes #3491
Comments
Duplicate of #2433? |
@rusty-snake I was talking with the OP on IRC about this for quite a while. I think there are a few other potentially related issues. The fact there's seemingly something keeping firejail from backgrounding processes might be the root cause or the common-denominator for issues that go beyond SSH and git. I'll add proper links to those i could find as soon as i can track them down again. |
Might be not the right issues here? I have problems with ansible. Might be a similar problem to the other issues. Unlink But I can connect just fine with ssh. Edit: |
To daemonize, a process must sever its relationship with its parent (e.g, the shell). This is done by forking and exiting; the new, orphaned process is usually assigned PID 1 (init) as a parent. Under firejail, it seems that orphaned processes are instead inherited by the same firejail process that spawned their parents, so it's not possible to "fork away" from your parent -- you'll just inherit the same one again. Could this possibly be solved by having a second firejail process, that itself is daemonized (detached from both its original parent process and the tty), and inherits orphaned processes instead of the main one? |
I came across this issue with Mentioning here in case helpful as the other issue is closed. |
See the following thread for a potential workaround: |
The following snippet works without problems when executed without firejail. However, when run with firejail (
firejail bash snippet.sh
), it keeps this process in the foreground.This causes problems with the SSH connection multiplexing feature and causes ansible and even git over SSH to hang, because SSH can not daemonize and lingers indefinitely.
Related: #1518
The text was updated successfully, but these errors were encountered: