From 6b7535df354ec4f07c591c2613c8ade7a8f7f730 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Mon, 13 Jun 2016 00:18:57 +0100 Subject: [PATCH] Fix condition for detecting read failure in process_child_status(). --- src/service.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service.cc b/src/service.cc index 5827e23..7dd8cb1 100644 --- a/src/service.cc +++ b/src/service.cc @@ -230,7 +230,7 @@ void ServiceRecord::process_child_status(EventLoop_t *loop, ServiceIoWatcher * s close(stat_io->fd); stat_io->deregisterWatch(loop); - if (r != 0) { + if (r > 0) { // We read an errno code; exec() failed, and the service startup failed. sr->pid = -1; log(LogLevel::ERROR, sr->service_name, ": execution failed: ", strerror(exec_status)); -- 2.25.1