aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/do-not-complain-if-interrupted-by-a-signal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/openrc/do-not-complain-if-interrupted-by-a-signal.patch')
-rw-r--r--main/openrc/do-not-complain-if-interrupted-by-a-signal.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/main/openrc/do-not-complain-if-interrupted-by-a-signal.patch b/main/openrc/do-not-complain-if-interrupted-by-a-signal.patch
new file mode 100644
index 0000000000..1d1a329c37
--- /dev/null
+++ b/main/openrc/do-not-complain-if-interrupted-by-a-signal.patch
@@ -0,0 +1,45 @@
+From 2504a2c25bc0587b36d81a2d85c203b20e2d40cf Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Wed, 14 Nov 2018 17:44:03 -0600
+Subject: [PATCH] Do not complain if interrupted by a signal
+
+In start-stop-daemon and rc-schedules, we were printing out a warning if
+the nanosleep call was interrupted by a signal, but we did not treat
+this as an error situation other than displaying the message, so there
+is no need for the message.
+---
+ src/rc/rc-schedules.c | 5 +----
+ src/rc/start-stop-daemon.c | 4 +---
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/rc/rc-schedules.c b/src/rc/rc-schedules.c
+index f7ef20fb..84c7ea18 100644
+--- a/src/rc/rc-schedules.c
++++ b/src/rc/rc-schedules.c
+@@ -376,10 +376,7 @@ int run_stop_schedule(const char *applet,
+ printf("\n");
+ progressed = false;
+ }
+- if (errno == EINTR)
+- eerror("%s: caught an"
+- " interrupt", applet);
+- else {
++ if (errno != EINTR) {
+ eerror("%s: nanosleep: %s",
+ applet, strerror(errno));
+ return 0;
+diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
+index 33f886c4..a96b29f0 100644
+--- a/src/rc/start-stop-daemon.c
++++ b/src/rc/start-stop-daemon.c
+@@ -996,9 +996,7 @@ int main(int argc, char **argv)
+ ts.tv_sec = start_wait / 1000;
+ ts.tv_nsec = (start_wait % 1000) * ONE_MS;
+ if (nanosleep(&ts, NULL) == -1) {
+- if (errno == EINTR)
+- eerror("%s: caught an interrupt", applet);
+- else {
++ if (errno != EINTR) {
+ eerror("%s: nanosleep: %s",
+ applet, strerror(errno));
+ return 0;