mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Fix #175: Ensure finit does not acquire 'dev' as controlling TTY
When starting a getty Finit checks first that the configured TTY device actually exists and is a TTY. This patch, by Tobias Waldekranz, ensures Finit (PID 1) doesn't acquire the TTY device as a controlling TTY. If that happens PID 1 will get all signals sent to the process actually started with the device as its controlling TTY. Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ static void add_console(char *cons)
|
||||
}
|
||||
|
||||
/* this requires we have /dev mounted && a device there */
|
||||
fds[num_cons] = open(path, O_WRONLY);
|
||||
fds[num_cons] = open(path, O_WRONLY | O_NOCTTY);
|
||||
if (fds[num_cons] < 0) {
|
||||
_pe("Failed opening console %s", path);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user