[rtmpdump] patch: strsignal

Peter Miller pmiller at opensource.org.au
Fri Apr 8 15:37:37 CEST 2011


This patch adds the use of strsignal, to print a human readable signal
name in the signal handler's log message.
-------------- next part --------------
MIME-Version: 1.0
Content-Type: application/aegis-patch
Subject: rtmpdump.2.3 - strsignal
Content-Name: rtmpdump.2.3.C022.patch
Content-Disposition: attachment; filename=rtmpdump.2.3.C022.patch
X-Aegis-Project-Name: rtmpdump.2.3
X-Aegis-Change-Number: 22

#	
#	This change set adds the use of strsignal, to print a human readable
#	signal name in the signal handler's log message.
#	
# Aegis-Change-Set-Begin
# QlpoMzFBWSZTWQ/9QVAAAL1bgAAQUId/6gQKv+/f6kAB3MsIBKgVH6aJp5GjQnlGUxAwmhk/
# TTQGqeak2oMjRkA0aAwMgyAAxGgyGQGCUJoIaU9pDSGEGmjTQNNRHZrA/gURGgjA6IcN/BDn
# AFUUFDqhHr7+cXfkwRfpRkcPaE8XSOaF55U24b7BMTr2CMb+O/00XfMDwwZji2LFvzy+ZpsM
# NLlql0iWS7Bm1O8QpU9pROx4nSj5tqOQNuIDgWidbFSSSQcaCxcAQnkChRw1gcscK2wxterX
# va8LfLDKzcuwOypAOAgjdAfPm0looOlUYXXv0ywI1PgFu7HogpAQefBbhXdW9XDfb49jGrz1
# +QcRc1VdW2jgyyIf2ZYD0HPnSin2NwUr3fndI/Qpf1nxBMdgWpXLZLRb7uDNdEJC1wTylymx
# /0ekXjo7xbVoaySJPnqrjCbGSZfGYYBZjmCUrCueu6J6XjuQXQNoaBtl4XTgwkoHHKqod9gr
# a9e6SDWdB6k1IpqEm7cQxsF0pCrMWm4I5uiLmF0UwkwkikqhHTHC2WZcznMFS/DtrxB6DGru
# TMiwZVmg1XcO+KkguuhTYtDG4yCoPlgMl7OmCGmWwKhOmqCFLS1zgm0JAf4u5IpwoSAf+oKg
# Aegis-Change-Set-End
#
Index: rtmpdump.c
--- rtmpdump.c
+++ rtmpdump.c
@@ -92,7 +92,8 @@
 sigIntHandler(int sig)
 {
   RTMP_ctrlC = TRUE;
-  RTMP_LogPrintf("Caught signal: %d, cleaning up, just a second...\n", sig);
+  RTMP_LogPrintf("Caught signal: %s (%d), cleaning up, just a second...\n",
+                 strsignal(sig), sig);
   /* ignore all these signals now and let the connection close */
   signal(SIGINT, SIG_IGN);
   signal(SIGTERM, SIG_IGN);
Index: rtmpgw.c
--- rtmpgw.c
+++ rtmpgw.c
@@ -766,7 +766,8 @@
 sigIntHandler(int sig)
 {
   RTMP_ctrlC = TRUE;
-  RTMP_LogPrintf("Caught signal: %d, cleaning up, just a second...\n", sig);
+  RTMP_LogPrintf("Caught signal: %d, cleaning up, just a second...\n",
+                 strsignal(sig), sig);
   if (httpServer)
     stopStreaming(httpServer);
   signal(SIGINT, SIG_DFL);
Index: rtmpsrv.c
--- rtmpsrv.c
+++ rtmpsrv.c
@@ -1061,7 +1061,8 @@
 sigIntHandler(int sig)
 {
   RTMP_ctrlC = TRUE;
-  RTMP_LogPrintf("Caught signal: %d, cleaning up, just a second...\n", sig);
+  RTMP_LogPrintf("Caught signal: %d, cleaning up, just a second...\n",
+                 strsignal(sig), sig);
   if (rtmpServer)
     stopStreaming(rtmpServer);
   signal(SIGINT, SIG_DFL);
Index: rtmpsuck.c
--- rtmpsuck.c
+++ rtmpsuck.c
@@ -1151,7 +1151,8 @@
 sigIntHandler(int sig)
 {
   RTMP_ctrlC = TRUE;
-  RTMP_LogPrintf("Caught signal: %d, cleaning up, just a second...\n", sig);
+  RTMP_LogPrintf("Caught signal: %d, cleaning up, just a second...\n",
+                 strsignal(sig), sig);
   if (rtmpServer)
     stopStreaming(rtmpServer);
   signal(SIGINT, SIG_DFL);


More information about the rtmpdump mailing list