int Ns_ExecArgblk (
char* sExec,
char* sDir,
int fdIn,
int fdOut,
char* argBlk,
Ns_Set* env
);
Change current directory to sDir
if it is not NULL and executes the file sExec
. All input will come from fdIn
if it's greater than 0; otherwise stdin
will be used. All output will go to fdOut
if it's greater than 0; otherwise stdout
will be used.
The argBlk
is a string of null-separated arguments, terminated with two nulls, like this: "foo\0bar\0\0".
The env
is an Ns_Set containing environment variables to pass the program.