mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3500] Running firejail with timeout causes SIGTTOU #2200
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#2200
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?
Originally created by @awelzel on GitHub (Jul 7, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3500
Bug and expected behavior
Running
firejailsurrounded by/usr/bin/timeoutfrom within a script and pressing "Enter" a few times before the program terminates causes the "sandbox" process to spin at 100% handling SIGTTOU and doesn't terminate unless sent SIGKILL.firejailterminates after the program terminates.No profile or disabling firejail
The reproducer does not use a profile.
Reproduce
This does not happen if
</dev/nullis added to the command (stdin won't be a tty), ortimeout --foregroundis used.Environment
lsb_release -a)Firejail version (output of
firejail --version) exclusive or used git commit (git rev-parse HEAD)f5fabe7637755b338e35a1b34709eeec572c2f92What other programs interact with the affected program for the functionality?
/usr/bin/timeoutAdditional context
This does not happen when
timeoutis used in an interactive shell. It needs to be done inside a script. See also the help for--foregroundinman timeoutthattimeoutbackgrounds processes when not run directly from a prompt.Running
firejailbackgrounded astimeoutdoes may not be supported, but the default behavior could be a bit nicer. I traced it toflush_stdin()and theioctl()flushing stdin causing the SIGTTOU, but not sure how to properly solve it. Maybe this could be conditional whether firejail is in the background or foreground?Checklist
find / -name 'firejail' 2>/dev/null/fd firejailto locate profiles ie in/usr/local/etc/firejail/PROGRAM.profile)