# FixIO Documentation

Back to summary

`import "io/process";`

## Process class

Process.

### Functions

`static function run(args: String[]): Integer
static function run(args: String[], env: String[String]): Integer
static function run(args: String[], env: String[String], path): Integer
`
  Runs a process and waits until it exits, returning the exit code. You can optionally provide environment and path from which to start the process.
`static function create(args: String[], env: String[String], path, flags: Integer): Process`
  Creates a new process, optionally providing environment, path and redirection of the standard streams.
  The flags can have these values:
  REDIR_IN - redirect input stream
  REDIR_OUT - redirect output stream
  REDIR_ERR - redirect error stream
  REDIR_MERGE_ERR - redirect error stream and merge with output stream
  You can also use these helper values:
  REDIR_NONE - no stream redirection
  REDIR_IN_OUT - redirect both input and output streams
  REDIR_ALL - redirect all streams
  REDIR_MERGED - redirect all streams with output and error streams being merged
`function in_write(buf: Byte[], off: Integer, len: Integer, timeout: Integer): Integer
function out_read(buf: Byte[], off: Integer, len: Integer, timeout: Integer): Integer
function err_read(buf: Byte[], off: Integer, len: Integer, timeout: Integer): Integer
`
  Direct functions for reading and writing to redirected standard streams of the process.
`function create_in_stream(): ProcessStream
function create_out_stream(): ProcessStream
function create_err_stream(): ProcessStream
function create_stream(): ProcessStream
`
  Creates a new stream class instances for various redirected standard streams.
`function wait(): Integer`
  Waits for the process to exit and returns the exit code.
`function kill()
function kill(force: Boolean)
`
  Kills the process.
`function is_running(): Boolean`
  Returns true when the process is still running.
`static function get_current_environment(): String[String]`
  Returns the current process environment variables.