Questions tagged [controlling-terminal]
The "controlling terminal" is an attribute of a process that identifies the terminal device that affects it with regards to "job control". It typically affects processes that run inside a terminal or open a terminal device.
19 questions
2 votes
1 answer
368 views
Why can't bash map ^C to intr signal if invoked as init?
If I make the bash as the first process invoked (i.e as init), as a result it will display the following: init: cannot set terminal process group (-1): Inappropriate ioctl for device init: no job ...
3 votes
0 answers
615 views
Controlling terminal of a display server
When I login on a Fedora 31 workstation and run the ps command, I see the below output; for an X session: PID TT CMD ... 1 ? /usr/lib/systemd/systemd --switched-root --system --deserialize ...
1 vote
2 answers
332 views
Can a (non-)controlling process detach its controlling terminal by closing its file descriptor?
In a process session with a controlling terminal, if the controlling process closes the file descriptor of the controlling terminal, does the process session become detached from the controlling ...
9 votes
2 answers
3k views
what relations are between my current controlling terminal and `/dev/tty`?
On Lubuntu 18.04, I run a shell in lxterminal. Its controlling terminal is the current pseudoterminal slave: $ tty /dev/pts/2 I would like to know what relations are between my current controlling ...
-3 votes
1 answer
466 views
Does a shell automatically connect file descriptors 0, 1 and 2 to its controlling terminal?
From The Linux Programming Interface In an interactive shell, these three file descriptors 0, 1 and 2 normally refer to the terminal under which the shell is running. Does "the terminal ...
2 votes
0 answers
70 views
Is `controlling terminal` solely for user control?
I can kill processes and send signals to them with kill, so I don't need controlling terminal (or ctty) for that. So.. is the purpose of controlling terminal is solely for reacting to nudges from user?...
3 votes
1 answer
3k views
Does keyboard input always go through a controlling terminal?
Am I right that all input typed from the keyboard goes through a controlling terminal? That means that if a program is run without a controlling terminal, it won't be able to receive any user input. ...
16 votes
2 answers
7k views
How to get the real name of the controlling terminal?
How can one get the real name of the controlling terminal (if there is one, else an error) as a pathname? By "real name", I mean not /dev/tty, which cannot be used by other arbitrary processes to ...