_execΒΆ

int result _exec ( string cmd , string env , string dir , boolean synchronous , boolean console )

Execute a command line in a new shell context

Under Linux, execution of the command is always asynchronous, thus the returned code never reflects the actual returned code of the command line. Use os.execute for synchronous execution.
Arguments:

  • cmd The command line to execute
  • env Additionnal environment set when executing the command line, only on Windows
  • dir The current directory to execute the command line, only on Windows
  • synchronous Should Guerilla wait for the command to proceed, only on Windows, Linux is asynchronous only
  • console Should Guerilla execute the command in a new term/console

Return:

  • result The return code of the command, only when the command is called in synchronous mode