Ubuntu Manpages

Ns_ExecArgblk, Ns_ExecArgv, Ns_ExecProc, Ns_ExecProcess, Ns_Fork,



#include "ns.h"

int
Ns_ExecArgblk(char *exec, char *dir, int fdin, int fdout,
              char *args, Ns_Set *env)

int
Ns_ExecArgv(char *exec, char *dir, int fdin, int fdout, 
            char **argv, Ns_Set *env)

int
Ns_ExecProc(char *exec, char **argv)

int
Ns_ExecProcess(char *exec, char *dir, int fdin, int fdout,
			char *args, Ns_Set *env)

int
Ns_Fork(void)

char
**Ns_GetEnviron(void)

int
Ns_WaitForProcess(int pid, int *statusPtr)

int
Ns_WaitProcess(int pid)

int
ns_fork(void)

These functions handle fork and exec operations. See files: nsd/exec.c, nsd/tclenv.c and nsthread/fork.c.

Executes a command in a child process. Return process id of child process exec´ing the command or -1 on failure. Provides extended error checking and error messages.

Execute a command in a child process using fork(2) and execve(2), returns the process id of child process exec´ing the command or -1 on failure. The child sends an extended error message to the parent.

Executes a command in a child process. Returns the process id of the child process exec´ing the command or -1 on failure. Simplifies call to Ns_ExecArgv.

Executes a command in a child process. Returns the process id of the child process exec´ing the command or -1 on failure. Calls Ns_ExecArgblk with same arguments.

Posix style fork(), using fork1() on Solaris if needed. See fork(2) man page. Calls ns_fork.

Returns pointer to the environment vector.

Wait for child process. Returns NS_OK on success, or NS_ERROR on failure. *statusPtr is set to the exit code of the child process.

Wait for child process. Calls Ns_WaitForProcess with NULL statusPtr. Returns NS_OK on success, or NS_ERROR on failure.

Posix style fork(), using fork1() on Solaris if needed.

nsd(1), info(n)