aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-25 18:12:49 +0000
committerRoy Marples <roy@marples.name>2007-04-25 18:12:49 +0000
commitc1d6bfc721eff57798317036004b0d87ce85a068 (patch)
tree3f28cc1d3eead082ba52ad5808fea91f67149fd5 /src
parent8e7868d80f4f45bd360765fc32780293231db831 (diff)
Don't abort select when on signals
Diffstat (limited to 'src')
-rw-r--r--src/librc.c5
-rw-r--r--src/runscript.c5
-rw-r--r--src/start-stop-daemon.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/src/librc.c b/src/librc.c
index 002ab6cd..7199cd9b 100644
--- a/src/librc.c
+++ b/src/librc.c
@@ -593,9 +593,10 @@ bool rc_wait_service (const char *service)
tv.tv_sec = 0;
tv.tv_usec = WAIT_INTERVAL;
if (select (0, 0, 0, 0, &tv) < 0) {
- if (errno != EINTR)
+ if (errno != EINTR) {
eerror ("select: %s",strerror (errno));
- break;
+ break;
+ }
}
/* Don't hang around forever */
diff --git a/src/runscript.c b/src/runscript.c
index 3a9c9d7b..2a41c9ba 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -374,9 +374,10 @@ static bool svc_exec (const char *service, const char *arg1, const char *arg2)
retval = select (MAX (stdout_pipes[0], stderr_pipes[0]) + 1,
&fds, 0, 0, 0);
if (retval < 0) {
- if (errno != EINTR)
+ if (errno != EINTR) {
eerror ("select: %s", strerror (errno));
- break;
+ break;
+ }
} else if (retval) {
ssize_t nr;
diff --git a/src/start-stop-daemon.c b/src/start-stop-daemon.c
index 6bf54138..f4f0f99e 100644
--- a/src/start-stop-daemon.c
+++ b/src/start-stop-daemon.c
@@ -390,9 +390,10 @@ static int run_stop_schedule (const char *exec, const char *cmd,
if (select (0, 0, 0, 0, &tv) < 0) {
if (errno == EINTR)
eerror ("%s: caught an interupt", progname);
- else
+ else {
eerror ("%s: select: %s", progname, strerror (errno));
- return (0);
+ return (0);
+ }
}
if (gettimeofday (&now, NULL) != 0) {