forked from krallin/tini
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure Tini doesn't lock up on of tty ownership
In the rare scenario where Tini is not running as PID 1 and its child (or something else) sets TOSTOP on the tty, then Tini would hang when if it tries to write debug messages. This commit fixes this problem by ignoring SIGTTOU. In the also rare scenario where two Tini instances are running, the tty-passing could end up being done improperly (if the parent Tini instance passes the tty to the child before the grandparent Tini instance passes it to the parent Tini instance), and result in the parent Tini instance running in the foreground. This commit fixes this problem by passing the tty in the child (which we can do because we are ignoring SIGTTOU).
- Loading branch information
Showing
1 changed file
with
102 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters