File: 15_glibc-strsignal.diff

package info (click to toggle)
csh 20240808-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,376 kB
  • sloc: ansic: 11,699; makefile: 60; sh: 16
file content (21 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Use strsignal() in favor of sys_siglist[]
 The sys_siglist, _sys_siglist and sys_sigabbrev arrays have been deprecated.
 All programs should use strsignal() instead.
 .
Author: Lukas Märdian <slyon@ubuntu.com>
Forwarded: no
Last-Update: 2021-04-23

---
--- a/proc.c
+++ b/proc.c
@@ -728,8 +728,7 @@
 			    && (reason != SIGPIPE
 				|| (pp->p_flags & PPOU) == 0))) {
 			(void) fprintf(cshout, "%*s", width,
-				       sys_siglist[(unsigned char)
-						   pp->p_reason]);
+				       strsignal(pp->p_reason));
 			hadnl = 0;
 		    }
 		    break;