mailing list of musl libc
 help / color / mirror / code / Atom feed
1967159c00ecefed937a4b7531e847a1d1f9230c blob 652 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 
#include <signal.h>
#include <string.h>

int sig2str(int sig, char *str)
{
	if (sig <= 0) return -1;

	if (sig <= SIGSYS)
		return (strcpy(str, __sys_signame[sig]), 0);

	if (sig == SIGRTMIN)
		return (strcpy(str, "RTMIN"), 0);
	if (sig == SIGRTMAX)
		return (strcpy(str, "RTMAX"), 0);

#if SIGPOLL != SIGIO
	if (sig == SIGPOLL)
		return (strcpy(str, "POLL"), 0);
#endif

	if (sig > SIGRTMIN && sig <= SIGRTMAX)
	{
		strcpy(str, "RTMIN+");
		int sigrt = sig-SIGRTMIN;

		if (sigrt < 10)
		{
			str[6] = '0'+sigrt;
			str[7] = '\0';
		}
		else
		{
			str[6] = '0'+sigrt/10;
			str[7] = '0'+sigrt%10;
			str[8] = '\0';
		}

		return 0;
	}

	return -1;
}
debug log:

solving 1967159c ...
found 1967159c in https://inbox.vuxu.org/musl/20240805065607.22897-2-contact@hacktivis.me/

applying [1/1] https://inbox.vuxu.org/musl/20240805065607.22897-2-contact@hacktivis.me/
diff --git a/src/signal/sig2str.c b/src/signal/sig2str.c
new file mode 100644
index 00000000..1967159c

Checking patch src/signal/sig2str.c...
Applied patch src/signal/sig2str.c cleanly.

index at:
100644 1967159c00ecefed937a4b7531e847a1d1f9230c	src/signal/sig2str.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).