Pike v8.1 release 6

Method exece()


Method exece

int exece(string file, array(string) args)
int exece(string file, array(string) args, mapping(string:string) env)

Description

This function transforms the Pike process into a process running the program specified in the argument file with the arguments args.

If the mapping env is present, it will completely replace all environment variables before the new program is executed.

Returns

This function only returns if something went wrong during exece(2), and in that case it returns 0 (zero).

Note

The Pike driver _dies_ when this function is called. You must either use fork() or Process.create_process() if you wish to execute a program and still run the Pike runtime.

This function is not available on all platforms.

See also

Process.create_process(), fork(), Stdio.File->pipe()