Modify

Opened 12 years ago

Closed 12 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 Changed 12 years ago by TicketCleanup

  • Milestone Future Release deleted

Automatic ticket cleanup.

comment:2 Changed 12 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to 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.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.