projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f69f345
)
Spawn.vala
author
Alan Knowles
<alan@roojs.com>
Tue, 10 Nov 2015 07:08:17 +0000
(15:08 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 10 Nov 2015 07:08:17 +0000
(15:08 +0800)
Spawn.vala
patch
|
blob
|
history
diff --git
a/Spawn.vala
b/Spawn.vala
index
e927c4f
..
b05e6b7
100644
(file)
--- a/
Spawn.vala
+++ b/
Spawn.vala
@@
-412,8
+412,7
@@
public class Spawn : Object
return str.length;
}
return str.length;
}
-
-
+
/**
* read from pipe and call appropriate listerner and add to output or stderr string.
/**
* read from pipe and call appropriate listerner and add to output or stderr string.
@@
-433,10
+432,17
@@
public class Spawn : Object
size_t len;
IOStatus status;
try {
size_t len;
IOStatus status;
try {
+ var cond = ch.get_buffer_condition();
+ if ((cond & GLib.IOCondition.ERR) > 0) {
+ return false;
+ }
+ if ((cond & GLib.IOCondition.IN) < 1) {
+ return false;
+ }
status = ch.read_line( out buffer, out len, out term_pos );
} catch (Error e) {
//FIXme
status = ch.read_line( out buffer, out len, out term_pos );
} catch (Error e) {
//FIXme
- break; // ??
+ return false;
}
}