Selaa lähdekoodia

Allow reading after child has exited.


git-svn-id: https://svn.microneil.com/svn/CodeDweller/branches/adeniz_1@99 d34b734f-a00e-4b39-a726-e4eeb87269ab
adeniz_1
adeniz 9 vuotta sitten
vanhempi
commit
f49d917e99
1 muutettua tiedostoa jossa 4 lisäystä ja 5 poistoa
  1. 4
    5
      child.hpp

+ 4
- 5
child.hpp Näytä tiedosto

@@ -983,8 +983,8 @@ namespace CodeDweller {
template<typename T>
size_t read(T &data, size_t nBytes = 0) {

if (!isRunning()) {
throw std::logic_error("No child process is running.");
if (!childStarted) {
throw std::logic_error("Child process was not started.");
}

data.clear();
@@ -1059,8 +1059,8 @@ namespace CodeDweller {
template<typename T, typename U>
bool readDelimited(T &data, U const &delimiter) {

if (!isRunning()) {
throw std::logic_error("No child process is running.");
if (!childStarted) {
throw std::logic_error("Child process was not started.");
}

data.clear();
@@ -1098,7 +1098,6 @@ namespace CodeDweller {

}


/** Non-blocking request to get data up to a delimiter read from
the child.


Loading…
Peruuta
Tallenna