[ Previous ] [ Contents ] [ Index ] [ Next ]



Execute file with argument array


    int Ns_ExecArgv (
    char* sExec, 
    char* sDir, 
    int fdIn, 
    int fdOut, 
    char** argv, 
    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 argv is a null-terminated array of argument strings, like this: { "foo", "bar", NULL }.

The env is an Ns_Set containing environment variables to pass the program.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.