This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ec6adc63f5 Documentation/nxinit: Say that the console is the 
controlling terminal.
3ec6adc63f5 is described below

commit 3ec6adc63f51fa0a8725fc1479d376b97703f91d
Author: Marco Casaroli <[email protected]>
AuthorDate: Fri Oct 23 17:52:44 2026 +0200

    Documentation/nxinit: Say that the console is the controlling terminal.
    
    The console option now also makes the device the controlling terminal
    of the service.  Describe what this gives: the terminal signals and the
    foreground process group of a shell.  Also say that the NSH sh program
    is not the foreground process at its prompt.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 Documentation/applications/system/nxinit/index.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/applications/system/nxinit/index.rst 
b/Documentation/applications/system/nxinit/index.rst
index d8e76cb9d1d..f2c29bc6648 100644
--- a/Documentation/applications/system/nxinit/index.rst
+++ b/Documentation/applications/system/nxinit/index.rst
@@ -76,6 +76,16 @@ never set up at all (there is no ``/dev/console`` unless
 default, if omitted) and duplicating it onto the service's stdin, stdout
 and stderr before it is spawned.
 
+After the start, the device is also the controlling terminal of the
+service (``TIOCSCTTY`` with the PID of the service), as init and getty do
+on other systems: Ctrl-C and Ctrl-Z send ``SIGINT`` and ``SIGTSTP`` to it
+(with ``CONFIG_TTY_SIGINT`` and ``CONFIG_TTY_SIGTSTP``), and a shell finds
+its foreground process group with ``tcgetpgrp()``, so it can use job
+control. A device without these signals keeps working as before. The NSH
+``sh`` program gives up the terminal at its prompt and makes each
+foreground command the foreground process, so Ctrl-C at its prompt does
+not end it.
+
 This is required for a plain shell service (e.g. ``service console sh``)
 to actually be usable as an interactive console. It is not needed for
 ``nsh`` (the full NSH application, as opposed to plain ``sh``), which

Reply via email to