@system(cmd:string)
@system(cmd:tab)


The first version of this command sends the cmd argument to the shell sh. The calling process waits for the shell to finish executing the command, ignoring SIGINT and SIGQUIT, and blocking SIGCHLD. A false boolean value is returned if an error occured (in this case an error message is issued).

The second version of the command spawn a new process from the executable file specified by cmd[0].

If the file specified by cmd[0] does not contains a slash character, the file parameter is used to construct a pathname, with its path prefix being obtained by a search of the path specified in the environment by the PATH variable (or of /usr/bin:/bin if this variable does not exist). The resulting pathname either refers to an executable object file, or a file of data for an interpreter.

At least cmd[0] must be present in the tab, and should contain the file name of the program being spawned, as an absolute or relative path to the program file to be launched.

The remaining elements in ::antescofo tab are converted into strings to construct the argument list to be made available to the new process.

For example

        @system("ls -l -R ..")
@system(["ls", "-l", "-R", ".."])