From 44182a1be82d5e5df6f7b1a3c85dd7386b397007 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 17 Sep 2018 22:59:31 +0200 Subject: A few useful error logs in process.cpp --- process.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/process.cpp b/process.cpp index cab5484..d245449 100644 --- a/process.cpp +++ b/process.cpp @@ -111,7 +111,10 @@ bool Process::writeLine(const string_view line) { } optional Process::readLine() { - if (pid == -1) return nullopt; + if (pid == -1) { + cerr << "-- readLine on pid==-1 --" << endl; + return nullopt; + } size_t idx = readBuf.find('\n'); if (idx != string::npos) { @@ -129,6 +132,7 @@ optional Process::readLine() { return nullopt; } if (nr == 0) { // EOF + cerr << "-- eof in readLine --" << endl; return nullopt; } s.resize(nr); -- cgit v1.2.3-70-g09d2