HELPLIB.HLB  —  CRTL  decc$set_child_default_dir
    Sets the default directory for a child process spawned by a
    function from the exec family of functions.

    This function is supported on OpenVMS Integrity servers and
    Alpha only.

    Format

      #include  <unixlib.h>

      int decc$set_child_default_dir  (const char *default_dir);

1  –  Arguments

 default_dir

    The default directory specification for child processes, or NULL.

2  –  Description

    By default, child processes created by one of the exec family of
    functions inherit the default (working) directory of their parent
    process.

    The decc$set_child_default_dir function lets you set the
    default directory for a child process. After calling decc$set_
    child_default_dir, newly spawned child processes have their
    default directory set to default_dir as they begin execution.
    The default_dir argument must represent a valid directory
    specification, or results of the call are unpredictable
    (subsequent calls to the child process might fail without
    notification). Both OpenVMS and UNIX style file specifications
    are supported for this function call.

    You can reestablish the default behavior by specifying default_
    dir as NULL. Subsequently, newly created child processes will
    inherit their parent's working directory.

3  –  Return Values

    0                  Successful completion. The new inherited
                       default directory was established.
    -1                 Indicates failure. No new default directory
                       was established for child processes. The
                       function sets errno to one of the following
                       values:

                       o  ENOMEM - Insufficient memory

                       o  ENAMETOOLONG - default_dir is too long to
                          issue the required SET DEFAULT command.
Close Help