Modify

#2047 closed Bug (No Bug)

ProcessExists bad return

Reported by: Jpm 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, on Nov 4, 2011 at 5:12:21 PM

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 Jpm, on Nov 5, 2011 at 8:05:19 AM

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

Last edited on Nov 7, 2011 at 4:06:01 PM by Jpm (previous) (diff)

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.