C# Class IronPython.Modules.PythonSubprocess

Afficher le fichier Open project: jschementi/iron Class Usage Examples

Méthodes publiques

Méthode Description
CreatePipe ( CodeContext context, object pSec, int bufferSize ) : PythonTuple
CreateProcess ( CodeContext context, string applicationName, string commandLineArgs, object pSec, object tSec, int bInheritHandles, uint dwCreationFlags, PythonDictionary lpEnvironment, string lpCurrentDirectory, object lpStartupInfo ) : PythonTuple
DuplicateHandle ( CodeContext context, BigInteger sourceProcess, BigInteger handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle
DuplicateHandle ( CodeContext context, BigInteger sourceProcess, PythonSubprocessHandle handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle

Duplicates a subprocess handle which was created for piping. This is only called when we're duplicating the handle to make it inheritable to the child process. In CPython the parent handle is always reliably garbage collected. Because we know this handle is not going to be used we close the handle being duplicated.

GetCurrentProcess ( ) : PythonSubprocessHandle
GetExitCodeProcess ( PythonSubprocessHandle hProcess ) : int
GetModuleFileName ( object ignored ) : string
GetStdHandle ( int STD_OUTPUT_HANDLE ) : object
GetVersion ( ) : int
TerminateProcess ( PythonSubprocessHandle handle, object uExitCode ) : bool
WaitForSingleObject ( PythonSubprocessHandle handle, int dwMilliseconds ) : int

Private Methods

Méthode Description
CloseHandle ( IntPtr hObject ) : bool
CreatePipePI ( IntPtr &hReadPipe, IntPtr &hWritePipe, SECURITY_ATTRIBUTES &lpPipeAttributes, uint nSize ) : bool
CreateProcessPI ( string lpApplicationName, string lpCommandLine, SECURITY_ATTRIBUTES &lpProcessAttributes, SECURITY_ATTRIBUTES &lpThreadAttributes, [ bInheritHandles, uint dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, [ lpStartupInfo, PROCESS_INFORMATION &lpProcessInformation ) : bool
DuplicateHandlePI ( IntPtr hSourceProcessHandle, IntPtr hSourceHandle, IntPtr hTargetProcessHandle, IntPtr &lpTargetHandle, uint dwDesiredAccess, [ bInheritHandle, uint dwOptions ) : bool
EnvironmentToNative ( PythonDictionary lpEnvironment ) : string
GetCurrentProcessPI ( ) : IntPtr
GetExitCodeProcessPI ( IntPtr hProcess, int &lpExitCode ) : bool
GetStdHandlePI ( int nStdHandle ) : IntPtr
GetVersionPI ( ) : int
TerminateProcessPI ( IntPtr hProcess, uint uExitCode ) : bool
WaitForSingleObjectPI ( IntPtr hHandle, int dwMilliseconds ) : int

Method Details

CreatePipe() public static méthode

public static CreatePipe ( CodeContext context, object pSec, int bufferSize ) : PythonTuple
context CodeContext
pSec object
bufferSize int
Résultat PythonTuple

CreateProcess() public static méthode

public static CreateProcess ( CodeContext context, string applicationName, string commandLineArgs, object pSec, object tSec, int bInheritHandles, uint dwCreationFlags, PythonDictionary lpEnvironment, string lpCurrentDirectory, object lpStartupInfo ) : PythonTuple
context CodeContext
applicationName string
commandLineArgs string
pSec object
tSec object
bInheritHandles int
dwCreationFlags uint
lpEnvironment PythonDictionary
lpCurrentDirectory string
lpStartupInfo object
Résultat PythonTuple

DuplicateHandle() public static méthode

public static DuplicateHandle ( CodeContext context, BigInteger sourceProcess, BigInteger handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle
context CodeContext
sourceProcess BigInteger
handle BigInteger
targetProcess BigInteger
desiredAccess int
inherit_handle bool
DUPLICATE_SAME_ACCESS object
Résultat PythonSubprocessHandle

DuplicateHandle() public static méthode

Duplicates a subprocess handle which was created for piping. This is only called when we're duplicating the handle to make it inheritable to the child process. In CPython the parent handle is always reliably garbage collected. Because we know this handle is not going to be used we close the handle being duplicated.
public static DuplicateHandle ( CodeContext context, BigInteger sourceProcess, PythonSubprocessHandle handle, BigInteger targetProcess, int desiredAccess, bool inherit_handle, object DUPLICATE_SAME_ACCESS ) : PythonSubprocessHandle
context CodeContext
sourceProcess BigInteger
handle PythonSubprocessHandle
targetProcess BigInteger
desiredAccess int
inherit_handle bool
DUPLICATE_SAME_ACCESS object
Résultat PythonSubprocessHandle

GetCurrentProcess() public static méthode

public static GetCurrentProcess ( ) : PythonSubprocessHandle
Résultat PythonSubprocessHandle

GetExitCodeProcess() public static méthode

public static GetExitCodeProcess ( PythonSubprocessHandle hProcess ) : int
hProcess PythonSubprocessHandle
Résultat int

GetModuleFileName() public static méthode

public static GetModuleFileName ( object ignored ) : string
ignored object
Résultat string

GetStdHandle() public static méthode

public static GetStdHandle ( int STD_OUTPUT_HANDLE ) : object
STD_OUTPUT_HANDLE int
Résultat object

GetVersion() public static méthode

public static GetVersion ( ) : int
Résultat int

TerminateProcess() public static méthode

public static TerminateProcess ( PythonSubprocessHandle handle, object uExitCode ) : bool
handle PythonSubprocessHandle
uExitCode object
Résultat bool

WaitForSingleObject() public static méthode

public static WaitForSingleObject ( PythonSubprocessHandle handle, int dwMilliseconds ) : int
handle PythonSubprocessHandle
dwMilliseconds int
Résultat int