diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-09-17 22:59:31 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-09-17 22:59:31 +0200 |
commit | 44182a1be82d5e5df6f7b1a3c85dd7386b397007 (patch) | |
tree | c3667f260fe444641dd581b9489111a32a43015d | |
parent | b9fe622b6f3b3a0abba1eee0d71285c7329c89d2 (diff) |
A few useful error logs in process.cpp
-rw-r--r-- | process.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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<string> 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<string> Process::readLine() { return nullopt; } if (nr == 0) { // EOF + cerr << "-- eof in readLine --" << endl; return nullopt; } s.resize(nr); |