mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #2715] [MERGED] Add deterministic-exit-code option #4496
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#4496
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/netblue30/firejail/pull/2715
Author: @apmorton
Created: 5/21/2019
Status: ✅ Merged
Merged: 5/21/2019
Merged by: @chiraag-nataraj
Base:
master← Head:features/deterministic-exit-code📝 Commits (1)
d380de3Add deterministic-exit-code option to ensure firejail exits with the first childs exit code regardless of the termination ordering of orphaned children📊 Changes
9 files changed (+82 additions, -2 deletions)
View changed files
📝
src/firejail/firejail.h(+1 -0)📝
src/firejail/main.c(+4 -0)📝
src/firejail/profile.c(+5 -0)📝
src/firejail/sandbox.c(+5 -2)📝
src/firejail/usage.c(+1 -0)📝
src/man/firejail-profile.txt(+4 -0)📝
src/man/firejail.txt(+4 -0)➕
test/environment/deterministic-exit-code.exp(+55 -0)📝
test/environment/environment.sh(+3 -0)📄 Description
Ensures firejail exits with the first childs exit code regardless of the termination ordering of orphaned children.
Firejail currently exits with the status code of whatever child itself exits last.
This can be non-deterministic if there are any orphaned children that outlive the process firejail launches.
Another patch motivated by compiler-explorer.
We care about the exit status of the process we run within firejail.
Some compilers we run potentially spawn and orphan non-critical background tasks, telemetry agents for example. We don't care if these auxiliary processes exit with an error. If they do exit with an error after the compiler itself exits, we lose the exit status of the compiler. If the compiler exits with an error, and then the telemetry agent exits without an error, we lose the error condition from the compiler.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.