From: Davin McCall Date: Sun, 12 Jun 2016 23:18:57 +0000 (+0100) Subject: Fix condition for detecting read failure in process_child_status(). X-Git-Tag: v0.03~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6b7535df354ec4f07c591c2613c8ade7a8f7f730;p=oweals%2Fdinit.git Fix condition for detecting read failure in process_child_status(). --- 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));