Source: nn Version: 6.7.3-14 Severity: normal Tags: patch Dear Maintainer,
>From f1c2df4107c73786e9f46d9a42af23ad4bb16f62 Mon Sep 17 00:00:00 2001 >From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> >Date: Sun, 28 Feb 2021 22:48:47 +0000 >Subject: [PATCH] execute.c: add comments related to "signal()" execute.c: Add comments related to "signal()". Add data type declarations of arguments to a prototype. Added a FIXME: use "sigaction(2)", see "signal(2)" Signed-off-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> --- execute.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/execute.c b/execute.c index ff9e789..04c6afc 100644 --- a/execute.c +++ b/execute.c @@ -30,7 +30,7 @@ static char *init_shell = SHELL; char *user_shell; char *exec_chdir_to = NULL; -extern int errno; +/* extern int errno; */ /* defined in errno.h */ static int @@ -54,7 +54,8 @@ int execute(char *path, char **args, int toggle_visual) { int was_raw, pid, i, status; - sig_type(*quit) (), (*intr) (), (*tstp) (); +/* "sig_type" is either int or void, defined in "global.h" */ + sig_type (*quit) (int), (*intr) (int), (*tstp) (int); was_raw = toggle_visual ? visual_off() : unset_raw(); @@ -74,6 +75,7 @@ execute(char *path, char **args, int toggle_visual) exit(20); } } +/* FIXME, use "sigaction(2)", see "signal(2)" */ quit = signal(SIGQUIT, SIG_IGN); intr = signal(SIGINT, SIG_IGN); -- 2.30.1 -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.9-1 (SMP w/2 CPU threads) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) -- debconf information excluded -- Bjarni I. Gislason