diff options
-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); |