Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 378494 | Differences between
and this patch

Collapse All | Expand All

(-)a/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindCommand.java (-4 / +6 lines)
Lines 76-88 public class ValgrindCommand { Link Here
76
76
77
	protected void readIntoBuffer(StringBuffer out, Process p) throws IOException {
77
	protected void readIntoBuffer(StringBuffer out, Process p) throws IOException {
78
		boolean success;
78
		boolean success;
79
		InputStream in;
79
		InputStream in, err, input;
80
		try {
80
		try {
81
			//We need to get the inputs before calling waitFor
82
			input = p.getInputStream();
83
			err =  p.getErrorStream();
81
			if (success = (p.waitFor() == 0)) {
84
			if (success = (p.waitFor() == 0)) {
82
				in = p.getInputStream();
85
				in = input;
83
			}
86
			}
84
			else {
87
			else {
85
				in = p.getErrorStream();
88
				in = err;
86
			}
89
			}
87
			int ch;
90
			int ch;
88
			while ((ch = in.read()) != -1) {
91
			while ((ch = in.read()) != -1) {
89
- 

Return to bug 378494