Modify

Opened 18 years ago

Closed 18 years ago

#232 closed Bug (No Bug)

StdoutRead with peek = true doesn't exits loop

Reported by: gcriaco <gcriaco@…> 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 TicketCleanup, 18 years ago

Milestone: Future Release

Automatic ticket cleanup.

comment:2 by Valik, 18 years ago

Resolution: No Bug
Status: newclosed

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.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.