Replace current process with a new process. Calling
exec
without first callingfork
will terminate your current Octave process and replace it with the program named by file. For example,exec ("ls" "-l")will run
ls
and return you to your shell prompt.If successful,
exec
does not return. Ifexec
does return, err will be nonzero, and msg will contain a system-dependent error message.