Modify ↓
Opened 18 years ago
Closed 18 years ago
#232 closed Bug (No Bug)
StdoutRead with peek = true doesn't exits loop
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.2.11.10 | Severity: | None |
| Keywords: | Cc: |
Description
Using peek = true the StdoutRead loop never terminates (@error = 0)
See the example below:
#include <Constants.au3>
Local $foo = Run(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $line
While 1
$line = StdoutRead($foo, True)
If @error Then ExitLoop
MsgBox(0, "STDOUT read:", $line)
Wend
MsgBox(0, "Debug", "Exiting...")
Attachments (0)
Change History (2)
comment:1 by , 18 years ago
| Milestone: | Future Release |
|---|
comment:2 by , 18 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
This is a duh moment. Of course it's never going to set @error. You never actually read the data so the stream *always* has data on it. This is most assuredly no bug.
Note:
See TracTickets
for help on using tickets.

Automatic ticket cleanup.