Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2047 closed Bug (No Bug)

ProcessExists bad return

Reported by: J-Paul Mesnage Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

$pid = Run(@comspec, "C:\", @SW_SHOWNORMAL, 2)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $pid = ' & $pid & @crlf & '>Error code: ' & @error & '    Extended code: 0x' & Hex( @extended) & @crlf) ;### Debug Console
$active="[class:ConsoleWindowClass]"
WinWaitActive($active)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : ProcessExists($pid) = ' & ProcessExists($pid) & @crlf & '>Error code: ' & @error & '    Extended code: 0x' & Hex( @extended) & @crlf) ;### Debug Console

The ProcessExists() returns 0 which is wrong.
It is OK if the Stdout is not redirected

Same situation with the Beta. I am running X86 Win7 Sp1

Attachments (0)

Change History (2)

comment:1 by Valik, 14 years ago

Resolution: No Bug
Status: newclosed

This is not a bug. The process really doesn't exist. It closes immediately because it does not have a STDIN stream pointing to anything useful. If you want the program to continue to run then you need to provide a STDIN handle.

comment:2 by J-Paul Mesnage, 14 years ago

Thanks,
It can be difficult to understand, perhaps some waring in the doc.

Version 0, edited 14 years ago by J-Paul Mesnage (next)

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.