1 GETWD(3C)                Standard C Library Functions                GETWD(3C)
   2 
   3 NAME
   4      getwd  get current working directory pathname
   5 
   6 SYNOPSIS
   7      #include <unistd.h>
   8 
   9      char *
  10      getwd(char *path_name);
  11 
  12 DESCRIPTION
  13      The getwd() function determines an absolute pathname of the current
  14      working directory of the calling process, and copies that pathname into
  15      the array pointed to by the path_name argument.
  16 
  17      If the length of the pathname of the current working directory is greater
  18      than (PATH_MAX + 1) including the null byte, getwd() fails and returns a
  19      null pointer.
  20 
  21 RETURN VALUES
  22      Upon successful completion, a pointer to the string containing the
  23      absolute pathname of the current working directory is returned.
  24      Otherwise, getwd() returns a null pointer and the contents of the array
  25      pointed to by path_name are undefined.
  26 
  27 ERRORS
  28      No errors are defined.
  29 
  30 USAGE
  31      The getwd() function is supplied for backwards compatibility.  The
  32      getcwd(3C) should be used instead.
  33 
  34 INTERFACE STABILITY
  35      Obsolete Standard.
  36 
  37 SEE ALSO
  38      getcwd(3C), standards(5)
  39 
  40 STANDARDS
  41      The getwd() function is available in the following compilation
  42      environments. See standards(5).
  43 
  44         X/Open Portability Guide Issue4, Version2 (XPG4.2)
  45         Version2 of the Single UNIX Specification (SUSv2)
  46         Version3 of the Single UNIX Specification (SUSv3)
  47 
  48      It was marked obsolete in Version3 of the Single UNIX Specification
  49      (SUSv3) and removed from IEEE Std 1003.1-2008 (POSIX.1).
  50 
  51 illumos                         March 30, 2015                         illumos