Process

An API for starting and communication with sub processes.

'process process_run(cmd : string, args : string array) Start a process using a command and the specified arguments. int process_stdout_read('process, buf : string, pos : int, len : int) Read up to len bytes in buf starting at pos from the process stdout. Returns the number of bytes readed this way. Raise an exception if this process stdout is closed and no more data is available for reading. int process_stderr_read('process, buf : string, pos : int, len : int) Read up to len bytes in buf starting at pos from the process stderr. Returns the number of bytes readed this way. Raise an exception if this process stderr is closed and no more data is available for reading. int process_stdin_write('process, buf : string, pos : int, len : int) Write up to len bytes from buf starting at pos to the process stdin. Returns the number of bytes writen this way. Raise an exception if this process stdin is closed. void process_stdin_close('process) Close the process standard input. int process_exit('process) Wait until the process terminate, then returns its exit code. int process_pid('process) Returns the process id. void process_close('process) Close the process I/O.

© Haxe Foundation | Contribute to this page