exec.c File Reference

#include "nsd.h"

Defines

#define ERR_DUP   (-1)
#define ERR_CHDIR   (-2)
#define ERR_EXEC   (-3)

Functions

int Ns_ExecProcess (char *exec, char *dir, int fdin, int fdout, char *args, Ns_Set *env)
int Ns_ExecProc (char *exec, char **argv)
int Ns_WaitProcess (int pid)
int Ns_WaitForProcess (int pid, int *exitcodePtr)
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)

Define Documentation

#define ERR_CHDIR   (-2)

#define ERR_DUP   (-1)

#define ERR_EXEC   (-3)


Function Documentation

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

---------------------------------------------------------------------- Ns_ExecArgblk --

Execute a command in a child process using a null byte separated list of args.

Results: Return process id of child process exec'ing the command or -1 on failure.

Side effects: None.

----------------------------------------------------------------------

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

---------------------------------------------------------------------- Ns_ExecArgv --

Execute a program in a new child process.

Results: Return process id of child process exec'ing the command or -1 on failure.

Side effects: None.

----------------------------------------------------------------------

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

---------------------------------------------------------------------- Ns_ExecProc --

Execute a command in a child process.

Results: Return process id of child process exec'ing the command or -1 on failure.

Side effects: None.

----------------------------------------------------------------------

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

---------------------------------------------------------------------- Ns_ExecProcess --

Execute a command in a child process.

Results: Return process id of child process exec'ing the command or -1 on failure.

Side effects: None.

----------------------------------------------------------------------

int Ns_WaitForProcess ( int  pid,
int *  exitcodePtr 
)

---------------------------------------------------------------------- Ns_WaitForProcess --

Wait for child process.

Results: Ruturn NS_OK for success and NS_ERROR for failure.

Side effects: Sets exit code in exitcodePtr if given.

----------------------------------------------------------------------

_WIN32

int Ns_WaitProcess ( int  pid  ) 

---------------------------------------------------------------------- Ns_WaitProcess --

Wait for child process

Results: Ruturn NS_OK for success and NS_ERROR for failure.

Side effects: None.

----------------------------------------------------------------------


Generated on Tue Sep 4 19:58:56 2007 by  doxygen 1.5.1