You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/06/03 04:50:19 UTC

[incubator-nuttx] branch master updated: signal: add define of SIGHUP/SIGTTIN

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5f46a21c25 signal: add define of SIGHUP/SIGTTIN
5f46a21c25 is described below

commit 5f46a21c25451118e8cfea8ea7ba42fbd649b789
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu Jun 2 15:17:23 2022 +0800

    signal: add define of SIGHUP/SIGTTIN
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 include/signal.h | 12 ++++++++++++
 sched/Kconfig    | 20 ++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/include/signal.h b/include/signal.h
index 50540c4988..9805b1e9fc 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -214,6 +214,18 @@
 #  define SIGPIPE       CONFIG_SIG_PIPE
 #endif
 
+#ifndef CONFIG_SIG_HUP
+#  define SIGHUP        14
+#else
+#  define SIGHUP        CONFIG_SIG_HUP
+#endif
+
+#ifndef CONFIG_SIG_TTIN
+#  define SIGTTIN       15
+#else
+#  define SIGTTIN       CONFIG_SIG_TTIN
+#endif
+
 /* The following are non-standard signal definitions */
 
 #ifndef CONFIG_DISABLE_PTHREAD
diff --git a/sched/Kconfig b/sched/Kconfig
index fdf8eb0cbe..5ce00f849d 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -1518,6 +1518,26 @@ config SIG_PIPE
 		This signal is generated when write on a pipe with no one to read it.
 		SIGPIPE may be ignored.
 
+config SIG_HUP
+	int "SIGHUP"
+	default 14
+	---help---
+		The SIGHUP would be sent to programs when the serial line was dropped,
+		often because the connected user terminated the connection by hanging up
+		the modem. The system would detect the line was dropped via the lost
+		Data Carrier Detect (DCD) signal.
+
+config SIG_TTIN
+	int "SIGTTIN"
+	default 15
+	---help---
+		A process cannot read from the user’s terminal while it is running as a
+		background job. When any process in a background job tries to read from
+		the terminal, all of the processes in the job are sent a SIGTTIN signal.
+		The default action for this signal is to stop the process. For more
+		information about how this interacts with the terminal driver, see Access
+		to the Controlling Terminal.
+
 comment "Non-standard Signal Numbers"
 
 config SIG_SIGCONDTIMEDOUT