std.ps.exec

std.ps

exec(pathname, ...)

Replace the current process with a new program

Replaces the current process image with the program at pathname. Additional arguments are passed as command-line arguments. The basename of pathname is used as argv[0]. Does not return on success.

The program starts with an empty signal mask and default handlers, whatever the caller blocked or caught. A signal the caller ignores stays ignored. When the exec fails, the call returns nil and an error, and the caller's handlers and mask are as they were.