C API Reference -- Ns_ExecArgblk

### Ns_ExecArgblk

#### Overview

Execute file with argument string

#### Syntax

        int Ns_ExecArgblk (
        char* sExec,
        char* sDir,
        int fdIn,
        int fdOut,
        char* argBlk,
        Ns_Set* env
        );

#### Description

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.

Top of Page
Copyright © 1998-99 America Online, Inc.